fix UnicodeDecodeError in debug templatetag

ticket: [23060](https://code.djangoproject.com/ticket/23060)

pls, review, thanks :beer: 
yes, please