[Python-Dev] ascii default encoding
M.-A. Lemburg
mal@lemburg.com
Sun, 16 Jul 2000 22:14:54 +0200
Jack Jansen wrote:
>
> Now that the default encoding for 8-bit strings has gone back to
> "ascii", shouldn't the initialization of strop.whitespace and friends
> only range over 0..128 in stead of 0..256?
>
> On the Macintosh string.whitespace is '\011\012\013\014\015 \312', but
> the \312 causes problems because it can't be converted from/to unicode
> as long as the default encoding is ascii...
string.py is depreciated -- please use string methods instead.
Note that the 8-bit string methods are locale aware in case
the C lib APIs isspace() and isalpha() support locales. You
may have to adjust the locale setting to POSIX for these
APIs to return ASCII only values.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/