[Python-3000] locale-aware strings ?

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Wed Sep 6 02:46:29 CEST 2006

Guido van Rossum wrote:
> On 9/5/06, Brian Quinlan <brian at sweetapp.com> wrote:
> [...]
> That would not be doing what the user wants. We have extensive
> experience with defaulting to ASCII in Python 2.x and it's mostly bad.
> There should definitely be a way to force ASCII as the default
> encoding (if only as a debugging aid), both in the program code and in
> the environment; but it shouldn't be the only default. There should
> also be a way to force UTF-8 as the default, or ISO-8859-1. But if
> CP436 is the default encoding set by the OS I don't see why Python
> shouldn't use that as the default *in the absence of any other
> preferences*.

Cp436 is almost certainly *not* the encoding set by the OS; Python
has got it wrong. If Brian is using an English-language variant of
Windows XP and has not changed the defaults, the system ("ANSI")
encoding will be Cp1252-with-Euro (which is similar enough to ISO-8859-1
if C1 control characters are not used).

David Hopwood <david.nospam.hopwood at blueyonder.co.uk>

More information about the Python-3000 mailing list