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