Python Tornado i18n csv文件和Unicode

Python Tornado i18n csv文件和Unicode,python,python-2.7,internationalization,tornado,Python,Python 2.7,Internationalization,Tornado,我正在从事一个tornado(python 2.7)项目,我想用多种语言提供它。 我正在使用tornado.locale来实现这一点,但在csv文件中使用德语umlauts时,会出现UnicodeDecodeError 我正在加载这样的翻译: translationsPath = os.path.join(os.path.dirname(__file__), "translations") tornado.locale.load_translations(translationsPath) 在

我正在从事一个tornado(python 2.7)项目,我想用多种语言提供它。 我正在使用tornado.locale来实现这一点,但在csv文件中使用德语umlauts时,会出现UnicodeDecodeError

我正在加载这样的翻译:

translationsPath = os.path.join(os.path.dirname(__file__), "translations")
tornado.locale.load_translations(translationsPath)
在我的csv文件中,我有以下内容(例如):

在我的模板中:

{{ _("Overview") }}
其结果是:

UnicodeDecodeError:“utf8”编解码器无法解码位置18中的字节0xfc:无效的开始字节

“Ü”应该包含在utf-8中,这样我就不会得到不起作用的东西


有什么想法吗?

没关系。当文件被破坏时。我猜Excel把编码搞砸了

{{ _("Overview") }}