Kids Return
所有内容未经说明都是原创。注明出处后欢迎转载。
Showing posts with label
String
.
Show all posts
Showing posts with label
String
.
Show all posts
Tuesday, November 16, 2010
[Python]String的decode, encode
string的decode用法:
str.decode(encoding="gb2312",errors="strict"
在这里我们告诉python解释器用encoding参数所指定的来对str解码.标准的encoding可以查看
这里
和简体中文相关的通常有gb2312,gb18030以及gbk(大多数BBS的中文encoding)
一篇参考http://hi.baidu.com/tornadory/blog/item/2fa5f0c36cf7bd5fb219a801.html
Older Posts
Home
Subscribe to:
Posts (Atom)