您的位置:首页 > 编程语言 > Go语言

Pycharm编码问题导致django UnicodeDecodeError 报错

2016-02-02 13:29 429 查看
pycharm 默认的配置,会导致创建的文件按照GBK的方式保存文件。

从而触发UnicodeDecodeError: 'utf8' codec can't decode byte 0xba in position 92: invalid start byte 报错

检查 view.py  | settings.py | html 文件都配置了utf8 ,所以是编辑器的问题。

修改:file - settings - file encodings - IDE Encoding | Project Encoding  UTF-8

default encoding for properties files :utf-8 

修改:file - default settings - file encodings - IDE Encoding | Project Encoding  UTF-8

default encoding for properties files :utf-8 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  django utf-8