Encoding troubles

Neil Hodgson nyamatongwe+thunder at gmail.com
Mon May 17 19:05:10 EDT 2010


JB:

> as hypens (–) and apostrophes (’) are in an odd encoding. When passed
> to the database using sqlalchemy they appear as – and other
> characters.

   The encoding is UTF-8. Normally the best way to handle encodings is
to convert to Unicode strings (unicode(s, "UTF-8")) as soon as possible
and perform most processing in Unicode.

   Neil



More information about the Python-list mailing list