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/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4