[Python-3000] Pre-PEP: Easy Text File Decoding

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Sep 12 01:44:13 CEST 2006


"Paul Prescod" <paul at prescod.net> writes:

>> The bizarre Windows behavious of using different
>> encodings for console and GUI programs doesn't
>> bother me either. Really. I promise."
>
> So according to this philosophy, Windows and Mac users will probably
> never be able to open UTF-8 documents by default even if every
> Microsoft app generates and consumes UTF-8 by default, because
> Microsoft and Apple will probably _never change the default locale_
> for backwards compatibility reasons.

This can be solved for file reading by making a "Windows locale"
always consider UTF-8 BOM and switch to UTF-8 in this case.

It's still unclear what to do for writing on Windows.

I have no idea what Mac does (does it typically use UTF-8 locales?
and does it typicaly use a BOM in UTF-8?).

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Python-3000 mailing list