Ascii to Unicode.

Joe Goldthwaite joe at goldthwaites.com
Wed Jul 28 19:00:26 EDT 2010


> Hello hello ... you are running on Windows; the likelihood that you
> actually have data encoded in latin1 is very very small. Follow MRAB's
> answer but replace "latin1" by "cp1252".

I think you're right. The database I'm working with is a US zip code
database.  It gets updated monthly.  The problem fields are some city names
in Puerto Rico. I thought I had tried the cp1252 codec and that it didn't
work. I tried it again and it works now so I was doing something else wrong.

I agree that's probably what I should be using.  Both latin1 and cp1252
produce the same output for the two characters I'm having the trouble with
but I changed it to cp1252 anyway.  I think it will avoid problems in the
future

Thanks John.




More information about the Python-list mailing list