Fixed #23060 -- UnicodeDecodeError in debug templatetag

Then a PR #2933

@claudep pls, review, thanks :beer: 

Reference Documents:

 - https://docs.djangoproject.com/en/dev/internals/contributing/committing-code/#committing-guidelines
 - https://docs.djangoproject.com/en/1.6/internals/contributing/writing-code/working-with-git/