Google App EngineのGoogle App EngineのテンプレートUnicodeのデコード問題
にfrom google.appengine.ext.webapp import template
templatepath = os.path.join(os.path.dirname(file), 'template.html')
self.response.out.write (template.render(templatepath , template_values))
をDjangoのテンプレートファイルをレンダリングしようとすると、私は次のようなエラーに遭遇:
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xe2 in position 17692: ordinal not in range(128)
args = ('ascii', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...07/a-beautiful-method-to-find-peace-of-mind/ -->
', 17692, 17693, 'ordinal not in range(128)')
encoding = 'ascii'
end = 17693
message = ''
object = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...07/a-beautiful-method-to-find-peace-of-mind/ -->
reason = 'ordinal not in range(128)'
start = 17692
それは根本的なDjangoテンプレートと思われますエンジンは、 "utf-8"であったはずの "ascii"エンコーディングを想定しています。 何が問題を引き起こしたのか、それを解決する方法を知っている人は誰ですか?おかげさまで
DEFAULT_CHARSETの値は何ですか? が役に立つかもしれません。 –
lavinio