UnicodeDecodeError

K

Ken Seehart

I get this whenever I encounter a non-ascii character in a non-unicode
string:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 23:
ordinal not in range(128)

The string in question is "... ESPA\xd1OL ..."

I completely understand why I get the error, and my solution will be to
simply convert to unicode (since the code that uses the string is
unicode ready).

I am wondering if anyone knows where I can find a mapping from this
particular extended ascii code (where \xd1 is Ñ), to the corresponding
unicode characters.

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top