[Tutor] Fixing "nearly ASCII" data file?
Alan Gauld
alan.gauld at btinternet.com
Tue Aug 11 01:12:20 CEST 2009
"Allen Fowler" <allen.fowler at yahoo.com> wrote
> I have some CSV data from Office / OpenOffice in "nearly ASCII" format.
> This is just basic text but it it stored as UTF-8, and has curly quotes,
> etc.
>
> Is there a way to easily read the file as ASCII by forcing these to the
> standard ASCII equivalents?
You should be able to process it using the string translation methods with
a one to one conversion.
try help(''.translate)
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list