"Decoding unicode is not supported" in unusual situation

Neil Cerutti neilc at norwich.edu
Fri Mar 9 14:23:21 CET 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