在中文 windows平台下:
#coding:utf-8 str = "hello 我是中国人,我爱中国" print str #乱码 print str.decode('utf-8').encode('gbk')
文件编码为 utf-8