Message8620
On output, this happens:
>>> p = u"Java 蛇"
>>> p
u'Java \u86c7'
>>> print p
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
LookupError: unknown encoding 'x-mswin-936'
If I had an acceptable encoding name here, it would still fail because there is no suitable codec (awaiting #1066). The following works (after the fix) because the bytes in the string are the bytes that the console expects:
>>> print "Java 蛇"
Java 蛇
There is still a difficulty when the code comes from a file. The bytes will be in the encoding used for the file, but this may not match the console. I think this is a Python 2k behaviour, best addressed by using Unicode, which brings us back to #1066. |
|
Date |
User |
Action |
Args |
2014-06-10 06:48:13 | jeff.allen | set | messageid: <1402382893.0.0.908553633541.issue2123@psf.upfronthosting.co.za> |
2014-06-10 06:48:13 | jeff.allen | set | recipients:
+ jeff.allen, zyasoft, rpan |
2014-06-10 06:48:12 | jeff.allen | link | issue2123 messages |
2014-06-10 06:48:12 | jeff.allen | create | |
|