Author 王杰
Recipients 王杰
Date 2015-12-24.03:49:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I use CentOS 7.0 and change LANG=gbk.

I has a file "" and it's encoding is GBK.

# -*- coding:utf-8 -*-
import chardet
if __name__ == '__main__':
    s = '中文'
    print s, chardet.detect(s) 

I execute it and everything is ok. However it raise "SyntaxError" (as I expected) after I change "encoding:utf-8" to "encoding:utf8".

  File "", line 2
SyntaxError: 'utf8' codec can't decode byte 0xd6 in position 0: invalid continuation byte

Is this ok? Or where I wrong?
Date User Action Args
2015-12-24 03:49:49王杰setrecipients: + 王杰
2015-12-24 03:49:49王杰setmessageid: <>
2015-12-24 03:49:49王杰linkissue25937 messages
2015-12-24 03:49:48王杰create