[Python-Dev] 3.2.1 encoding surprise

Anthony Kong anthony.hw.kong at gmail.com
Mon Jul 18 22:35:52 CEST 2011


Similar outcome as Paul's.

$ python3 t32enc.py
$ python 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.org/peps/pep-0263.html for details
$ python3 -V
Python 3.2.1a0
$ python -V
Python 2.6.1

Running the script on OSX 10.6.8

(And I just realised I am running 3.2.1a0...)

Cheers

On Tue, Jul 19, 2011 at 6:01 AM, Paul Moore <p.f.moore at gmail.com> wrote:

> 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.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/anthony.hw.kong%40gmail.com
>



-- 

Tony Kong
*blog:* www.ahwkong.com

Don’t EVER make the mistake that you can design something better than what
you get from ruthless massively parallel trial-and-error with a feedback
cycle. That’s giving your intelligence *much* too much credit.


- Linus Torvalds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110719/6519a441/attachment.html>


More information about the Python-Dev mailing list