"Decoding unicode is not supported" in unusual situation

Neil Cerutti neilc at norwich.edu
Fri Mar 9 08:23:21 EST 2012


On 2012-03-08, John Nagle <nagle at animats.com> wrote:
> So it's possible to get junk characters in a "str", and they
> won't convert to Unicode.  I've had this happen with databases
> which were supposed to be ASCII, but occasionally a non-ASCII
> character would slip through.

Perhaps encode and then decode, rather than try to encode a
non-encoded str.

-- 
Neil Cerutti



More information about the Python-list mailing list