unicode for beginners

WallyDD shanebest at gmail.com
Thu Mar 26 17:36:20 EDT 2009


On Mar 26, 5:30 pm, Peter Otten <__pete... at web.de> wrote:
> WallyDD wrote:
> > 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?
> >>> print "R\u00cdO DE JANEIRO".decode("unicode-escape")
>
> RÍO DE JANEIRO
>
> Peter

Works like a charm, exactly what I was looking for.

Thank you very much.



More information about the Python-list mailing list