Python 3.0b2 cannot map '\u12b'
dear.jay.logan at gmail.com
Sun Aug 31 21:02:44 CEST 2008
I am using Python 3.0b2.
I have an XML file that has the unicode character '\u012b' in it,
which, when parsed, causes a UnicodeEncodeError:
'charmap' codec can't encode character '\u012b' in position 26:
character maps to <undefined>
This happens even when I assign this character to a reference in the
Python 3.0b2 (r30b2:65106, Jul 18 2008, 18:44:17) [MSC v.1500 32 bit
Type "help", "copyright", "credits" or "license" for more information.
>>> s = '\u012b'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python30\lib\io.py", line 1428, in write
b = encoder.encode(s)
File "C:\Python30\lib\encodings\cp437.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u012b' in
1: character maps to <undefined>
Is this a known issue, or am I doing something wrong?
Here is a link to the XML file. The character is on line 600, char 54
More information about the Python-list