what is the unicode?
dan at tombstonezero.net
Sat Jan 28 10:01:09 EST 2012
On Sat, 28 Jan 2012 15:47:17 +0800, contro opinion wrote:
> so,'\xe4\xb8\xad\xe5\x9b\xbd' is the utf-8 of '中国'
Those bytes are the utf-8 encoding of those CJK ideograph (I won't even
pretend to know what those CJK ideographs are or what they mean).
> so,'\xd6\xd0\xb9\xfa' is the utf-8 of '中国'
Those bytes are the gbk encoding of those CJK ideographs.
> what is the meaning of u'\u4e2d\u56fd'? u'\u4e2d\u56fd' = \x4e2d\x56fd
Those are the "code points" of those characters. Unicode assigns code
point, which are just integers, to characters. The code points are easier
to work with inside your application, but you usually have to encode them
into bytes to transfer them into or out of your application.
More information about the Python-list