[Python-3000] PEP 3120 (Was: PEP Parade)
"Martin v. Löwis"
martin at v.loewis.de
Thu May 3 23:09:16 CEST 2007
>> 1. read input into a buffer
>> 2. determine source encoding (looking at a BOM, else a
>> declaration within the first two lines, else default
>> to UTF-8)
>> 3. if the source encoding is not UTF-8, pass it through
>> a codec (decode to string, encode to UTF-8). Otherwise,
>> check that all bytes are really well-formed UTF-8.
>> 4. start parsing
> So people could hook into their own "codec" that, say, replaced native
> language keywords with standard python keywords?
No, so that PEP 263 remains implemented.
More information about the Python-3000