写了一个新的Django模板文件,运行报错:
UnicodeDecodeError at /bk/ServerStatus.html
'utf8' codec can't decode byte 0xb6 in position 1285: invalid start byte
原因在于模板文件。html默认是以ascii存储的,为此,需要使用记事本打开html文件,选择另存为,在最底下的编码方式中选择utf-8,即可解决问题。
写了一个新的Django模板文件,运行报错:
'utf8' codec can't decode byte 0xb6 in position 1285: invalid start byte
原因在于模板文件。html默认是以ascii存储的,为此,需要使用记事本打开html文件,选择另存为,在最底下的编码方式中选择utf-8,即可解决问题。