I'm using code.Interactiv e console but it doesn't work correctly
with non-ascii characters. I think it boils down to this problem:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> print u"ä"[/color][/color][/color]
ä[color=blue][color=green][color=darkred]
>>> exec 'print u"ä"'[/color][/color][/color]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1, in ?
File "c:\python24\li b\encodings\cp8 50.py", line 18, in encode
return codecs.charmap_ encode(input,er rors,encoding_m ap)
UnicodeEncodeEr ror: 'charmap' codec can't encode character u'\x84' in position 0: character maps to <undefined>[color=blue][color=green][color=darkred]
>>> ^Z[/color][/color][/color]
Why does the exec call fail, and is there a workaround?
Thanks,
Thomas
with non-ascii characters. I think it boils down to this problem:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> print u"ä"[/color][/color][/color]
ä[color=blue][color=green][color=darkred]
>>> exec 'print u"ä"'[/color][/color][/color]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1, in ?
File "c:\python24\li b\encodings\cp8 50.py", line 18, in encode
return codecs.charmap_ encode(input,er rors,encoding_m ap)
UnicodeEncodeEr ror: 'charmap' codec can't encode character u'\x84' in position 0: character maps to <undefined>[color=blue][color=green][color=darkred]
>>> ^Z[/color][/color][/color]
Why does the exec call fail, and is there a workaround?
Thanks,
Thomas
Comment