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 wiscados
Recipients wiscados
Date 2007-11-24.21:00:40
SpamBayes Score 0.002891353
Marked as misclassified No
Message-id <1195938040.58.0.768947830961.issue1495@psf.upfronthosting.co.za>
In-reply-to
Content
My script reports this problem:

"""
$ python bug.py 
  File "bug.py", line 4
SyntaxError: Non-ASCII character '\xc2' in file bug.py on line 4, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for details
"""

This error looks fine and all, but the problem is that the non-ASCII
character (in this case '¤') is in a comment, not in the script itself.
If I remove it the non-ASCII character from the comment, it runs perfectly. 

I always assumed that comment didn't effect the script.

This isn't exactly a big problem, but I don't think it should be this way.

I included the demo script.

PS.
$ python -V
Python 2.5.1
Files
File name Uploaded
bug.py wiscados, 2007-11-24.21:00:40
History
Date User Action Args
2007-11-24 21:00:40wiscadossetspambayes_score: 0.00289135 -> 0.002891353
recipients: + wiscados
2007-11-24 21:00:40wiscadossetspambayes_score: 0.00289135 -> 0.00289135
messageid: <1195938040.58.0.768947830961.issue1495@psf.upfronthosting.co.za>
2007-11-24 21:00:40wiscadoslinkissue1495 messages
2007-11-24 21:00:40wiscadoscreate