unicode for beginners

W

WallyDD

I have something of a csv file which has somehow been converted into
something that looks like this;
" FOZ DE IGUAZ\u00da" and " R\u00cdO DE JANEIRO"

Is there a simple way to convert this into something a little bit
readable?

Is there a simple command in python to convert this?

Thank you.
 
P

Peter Otten

WallyDD said:
I have something of a csv file which has somehow been converted into
something that looks like this;
" FOZ DE IGUAZ\u00da" and " R\u00cdO DE JANEIRO"

Is there a simple way to convert this into something a little bit
readable?

Is there a simple command in python to convert this?
RÃO DE JANEIRO

Peter
 
V

Vlastimil Brom

2009/3/26 WallyDD said:
I have something of a csv file which has somehow been converted into
something that looks like this;
" FOZ DE IGUAZ\u00da" and " R\u00cdO DE JANEIRO"
Is there a simple way to convert this into something a little bit
readable?
Is there a simple command in python to convert this?

Thank you.

Hi,
try decoding your output (assuming all non-ascii characters are
escaped this way completely)

hth
vbr
 
S

skip

Wally> I have something of a csv file which has somehow been converted
Wally> into something that looks like this...

Wally> Is there a simple way to convert this into something a little bit
Wally> readable?

Look at the unicode_csv_reader function in the csv module doc's examples:

http://docs.python.org/library/csv.html#examples
 

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

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top