Trying to understand this moji-bake
Terry Reedy
tjreedy at udel.edu
Sat Jan 25 22:31:58 EST 2014
On 1/25/2014 2:13 PM, Chris Angelico wrote:
> On Sun, Jan 26, 2014 at 4:56 AM, Peter Pearson <ppearson at nowhere.invalid> wrote:
>> $ python2.7 -c "import sys; print(sys.stdin.encoding)"
>> UTF-8
>
> This isn't from stdin, though, it's about the interpretation of the
> bytes of source code without a magic cookie.
>
> According to PEP 263 [1], the default encoding should have become
> "ascii" as of Python 2.5. That's what puzzles me.
I believe it is actually (but unofficially) latin-1 so that latin-1
accented chars can be used in identifiers even though only ascii is
officially supported.
--
Terry Jan Reedy
More information about the Python-list
mailing list