ASCII encoding error: ordinal not in range(128)

Andrew Kuchling akuchlin at mems-exchange.org
Tue Mar 20 18:31:31 EST 2001


"Fredrik Lundh" <fredrik at pythonware.com> writes:
> > UnicodeError: ASCII encoding error: ordinal not in range(128)
> 
> translated to english, this overly cute error message attempts
> to say something like "cannot convert this Unicode string to
> ASCII as it contains non-ASCII characters"

Hmm... hasn't changing this message before been discussed someplace?
Was there some reason it wasn't changed?  How about: "UnicodeError:
ASCII encoding error: character not in ASCII range 0-127" ?  (I
vaguely recall Marc-Andre arguing for "ordinal", since that's used in
the Unicode documents, but if it's less clear...)

--amk



More information about the Python-list mailing list