mgood/flask-debugtoolbar — pull request #46 by karipe (2013-02-23 13:40:47+00:00)
Title: Fix template editor encoding problem

I'm sorry my poor English.

If encoding of document isn't ascii, current version of template editor generate this exception.

File "/.../flask_debugtoolbar/panels/template.py", line 92, in template_editor
for t in templates
UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 1473: ordinal not in range(128)

I fixed this bug, and add a new config variables:
DEBUG_TB_TEMPLATE_EDITOR_ENCODING - default is utf-8. if modify this variable, template editor recognize file's encoding.