char 128? no... 256

Afanasiy abelikov72 at hotmail.com
Tue Feb 11 23:37:28 EST 2003


On Tue, 11 Feb 2003 20:23:05 -0800, Erik Max Francis <max at alcyone.com>
wrote:

>Afanasiy wrote:
>
>> Oh, and I did try this... it says it doesn't support decoding...
>
>You're going to have to give us more information to go on than this. 
>Show us the exact object you're dealing with and exactly what you're
>trying to do with it and the exact error that you're getting in the
>process.

>>> s = 'ö'
>>> s
'\x94'
>>> print s
ö

>>> s = u'o'
>>> print s
o
>>> print unicode(s,'ascii')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported
>>> print unicode(s,'utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported
>>> print unicode(s,'iso-8859-1')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported

>>> s = 'ö'
>>> print unicode(s,'ascii')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported
>>> print unicode(s,'utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported
>>> print unicode(s,'iso-8859-1')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: decoding Unicode is not supported





More information about the Python-list mailing list