[docs] [issue18870] eval() uses latin-1 to decode str

Antoine Pitrou report at bugs.python.org
Wed Aug 28 22:20:31 CEST 2013

Antoine Pitrou added the comment:

> Since the default source encoding in python2 is latin-1

Mmh, really? According to PEP 263:

    Python will default to ASCII as standard encoding if no other
    encoding hints are given.

And indeed when trying Merlijn's code in a .py file rather than an eval() call, I get:

SyntaxError: Non-ASCII character '\xc3' in file tcc.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

components: +Interpreter Core -Documentation
nosy: +benjamin.peterson, pitrou
type:  -> behavior

Python tracker <report at bugs.python.org>

More information about the docs mailing list