[Tutor] print the hole unicode list
Yang
winglion1 at 163.com
Thu Aug 28 03:59:05 CEST 2008
Hello,
I am trying to print out the hole unicode char list in window! form 0-65535.
I use the winxp in simple chinese LOCAL! the ascii form 0-127 and CJK chars form
0X4E00-0X9FA4 can be print out! Other ucode chars case this error
"UnicodeEncodeError: 'gbk' codec can't encode character u'\u9fa6' in position 0"
my code is here:
for i in range(0,65536 ):
uchar=unicode("\u%04X"%i,"unicode-escape")
print "%x :"%i,uchar
how can I achive a hole unicode list? Or can it be done?
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Yang
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡winglion1 at 163.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2008-08-28
More information about the Tutor
mailing list