New submission from Magnus Valle:

My script reports this problem:

$ python 
  File "", line 4
SyntaxError: Non-ASCII character '\xc2' in file on line 4, but no
encoding declared; see 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.

$ python -V
Python 2.5.1

components: Unicode
messages: 57817
nosy: wiscados
severity: minor
status: open
title: Unicode in a comment.
versions: Python 2.5
Added file:

# Bug report recreation
print a
# If a unicode character is in a comment it won't run ¤
Python-bugs-list mailing list 

Reply via email to