This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author v+python
Recipients ezio.melotti, hynek, v+python
Date 2012-05-15.08:54:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337072083.72.0.166432626745.issue14811@psf.upfronthosting.co.za>
In-reply-to
Content
There is no traceback.  Here is the text of the Syntax error.

d:\my\im\infiles>c:\python32\python.exe d:\my\py\t33a.py -h
  File "d:\my\py\t33a.py", line 2
SyntaxError: Non-UTF-8 code starting with '\xc3' in file d:\my\py\t33a.py on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

My understanding is Python 3 uses utf-8 as the default encoding for source files -- unless there is an encoding line; and I've set my emacs to save all .py files as utf-8-unix (meaning with no CR, if you aren't an emacs user).

I verified with a hex dump that the encoding in the file is UTF-8, but you are welcome to also, that is the file I uploaded.

So your testing would seem to indicate it is a platform specific bug.  Try running it on Windows, then.

Further, if it were the platform default encoding, adding a space wouldn't cure it... the encoding of the file would still be UTF-8, and the platform default encoding would still be the same whatever you think it might be (but I think it is UTF-8 for source text), so adding a space would not effect an encoding mismatch.
History
Date User Action Args
2012-05-15 08:54:43v+pythonsetrecipients: + v+python, ezio.melotti, hynek
2012-05-15 08:54:43v+pythonsetmessageid: <1337072083.72.0.166432626745.issue14811@psf.upfronthosting.co.za>
2012-05-15 08:54:43v+pythonlinkissue14811 messages
2012-05-15 08:54:42v+pythoncreate