[Python-Dev] Encodings
Fredrik Lundh
fredrik@pythonware.com
Fri, 7 Jul 2000 23:28:21 +0200
guido wrote:
> > The meaning of mixing both kinds of objects is very easy to explain,
> > and also allows for efficient implementation - which you won't get if
> > you have to invoke a character conversion just to get the hash value
> > of a unicode value (!)
>
> I agree with this point. It can be implemented easily by deleting the
> locale specific guessing from site.py.
as an aside, Jack reported that:
if u" " in tuple(string.whitespace):
...
bombs on the macintosh (this is from SRE). the reason? the default
encoding is set to "ascii", but C's isspace predicate thinks that some
characters in the 128-255 range are whitespace characters.
tricky.
</F>
PS. I'll post the Windows get_locale code tomorrow. hopefully, Jack
can whip up something similar for the Mac.