[Tutor] UnicodeEncodeError in python
Peter Otten
__peter__ at web.de
Thu Sep 11 22:23:53 CEST 2014
Juan Christian wrote:
> On Thu, Sep 11, 2014 at 4:39 PM, Juan Christian <juan0christian at gmail.com>
> wrote:
>>
>> Using 3.4.1
>>
>> I did try:
>>
>> self.persona_name = unicode(personaname)
>> self.persona_name = personaname.decode("utf-8")
>>
>> But didn't work!
>>
>
>
> Some of the chars that brakes the program:
>
> \u0183
> \u2020
> \u0361
> \u0649
>
> And many others crazy chars.
You are getting an *encoding* error, so this may be triggered when you are
trying to print. Can you post the traceback?
Also, what is your OS and what does
$ python3 -c'import locale; print(locale.getpreferredencoding())'
UTF-8
show?
More information about the Tutor
mailing list