Meeting20100904: explicit-utf8-template-encoding.diff
File explicit-utf8-template-encoding.diff, 945 bytes (added by , 14 years ago) |
---|
-
trac/web/chrome.py
775 775 self.templates = TemplateLoader( 776 776 self.get_all_templates_dirs(), auto_reload=self.auto_reload, 777 777 max_cache_size=self.genshi_cache_size, 778 default_encoding="utf-8", 778 779 variable_lookup='lenient', callback=lambda template: 779 780 Translator(translation.get_translations()).setup(template)) 780 781 … … 848 849 849 850 try: 850 851 buffer = StringIO() 851 stream.render(method, doctype=doctype, out=buffer )852 stream.render(method, doctype=doctype, out=buffer, encoding="utf-8") 852 853 return buffer.getvalue().translate(_translate_nop, 853 854 _invalid_control_chars) 854 855 except Exception, e: