Characters in Python
Tony Meyer
ta-meyer at ihug.co.nz
Thu Jun 5 19:18:21 EDT 2003
> Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license" for more information.
> IDLE 0.8 -- press F1 for help
> >>> theStr = u"Åäö"
> UnicodeError: ASCII encoding error: ordinal not in range(128)
> >>>
FWIW:
Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 bit (Intel)] on
win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> theStr = u"Åäö"
>>> theStr
u'\xc5\xe4\xf6'
>>>
I get the same error as you using Python 2.2.3. (In fact, if I copy and
paste from the 2.2 tutorial (unicode strings section), I get an error :/ ).
Is using Python 2.3b1 a possibility?
=Tony Meyer
More information about the Python-list
mailing list