[Python-Dev] 3.2.1 encoding surprise

Paul Moore p.f.moore at gmail.com
Mon Jul 18 22:01:06 CEST 2011


2011/7/18 Glenn Linderman <v+python at g.nevcal.com>:
> Attached reduced test case works fine with Python 3.1, fails with Python3.2:

PS D:\Data> py -3 .\t32enc.py
PS D:\Data> py -2 .\t32enc.py
  File ".\t32enc.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file .\t32enc.py on line 1,
but no encoding declared; see http://www.python.o
rg/peps/pep-0263.html for details
PS D:\Data> py -3 --version
Python 3.2.1
PS D:\Data> py -2 --version
Python 2.7

Windows 7 32-bit, py is Vinay's implementation of the PEP 397 launcher
for Windows.

This looks like correct output to me.

Could it be your environment somehow?
Paul.


More information about the Python-Dev mailing list