用django展示模板时,出现如下错误:

'utf8' codec can't decode byte 0xd3 in position 197: invalid continuation byte

 

应该是原文本的编码不对,要将其从gbk转换为utf8

于是:

iconv -f gbk -t utf-8 index.html

 

解决

posted on 2013-08-30 11:44  andy071001  阅读(777)  评论(0编辑  收藏  举报