2009/3/26 WallyDD <shaneb...@gmail.com>: > 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. > -- > http://mail.python.org/mailman/listinfo/python-list >
Hi, try decoding your output (assuming all non-ascii characters are escaped this way completely) >>> " FOZ DE IGUAZ\u00da and R\u00cdO DE JANEIRO".decode("unicode-escape") u' FOZ DE IGUAZ\xda and R\xcdO DE JANEIRO' >>> print " FOZ DE IGUAZ\u00da and R\u00cdO DE JANEIRO".decode("unicode-escape") FOZ DE IGUAZÚ and RÍO DE JANEIRO >>> hth vbr -- http://mail.python.org/mailman/listinfo/python-list