regomodo Guru
Joined: 25 Mar 2008 Posts: 445
|
Posted: Wed Oct 07, 2009 2:02 pm Post subject: [solved] Python Unicode Bug |
|
|
Hi, i'm developing an Amarok-1.4 clone and I have a weird issue going on in Gentoo with Unicode. It seems to complain about code that shouldn't.
Code: | >>> a = "Bj\xc3\xb6rk"
>>> b = a.decode("utf-8")
>>> print b
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 2: ordinal not in range(128)
>>>
|
However, whenever I run the same on Ubuntu this is what I get:
Code: | >>> a = "Bj\xc3\xb6rk"
>>> b = a.decode("utf-8")
>>> print b
Björk
|
What is causing the error in Gentoo?
Last edited by regomodo on Wed Oct 07, 2009 2:45 pm; edited 1 time in total |
|