shenGun 最近的时间轴更新
shenGun

shenGun

V2EX 第 51246 号会员,加入于 2013-12-04 13:31:13 +08:00
shenGun 最近回复了
http://docs.python.org/2/howto/unicode.html
Latin-1, also known as ISO-8859-1, is a similar encoding. Unicode code points 0-255 are identical to the Latin-1 values, so converting to this encoding simply requires converting code points to byte values; if a code point larger than 255 is encountered, the string can’t be encoded into Latin-1.

在Documentation中提示unicode的0-255编码和Latin-1的0-255是一样的。说以u'\xb2\xe2\xca\xd4'.decode('Latin-1')转好之后就是'\xb2\xe2\xca\xd4'其实好像还是GB2312的编码
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1065 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 20:26 · PVG 04:26 · LAX 12:26 · JFK 15:26
Developed with CodeLauncher
♥ Do have faith in what you're doing.