Issue1384

classification
Title: jython parses the contents of the comments
Type: behaviour Severity: normal
Components: Versions: 2.5b0
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, ita
Priority: Keywords:

Created on 2009-06-19.19:17:36 by ita, last changed 2012-04-03.15:22:56 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
test.py ita, 2009-06-19.19:17:36 file containing invalid utf-8 characters but commented by #
Messages
msg4826 (view) Author: ita (ita) Date: 2009-06-19.19:17:36
/tmp/build > ~/jython/bin/jython test.py
  File "<string>", line None
SyntaxError: Illegal character in file 'test.py' for encoding 'utf-8'

The file is executed by cpython without problem (the cpython lexer
refuses only \r characters in # comments)

For a practical application, some scripts such as Waf use embedded
binary data (bzip2) to ease script redistribution
(http://code.google.com/p/waf).
msg5481 (view) Author: ita (ita) Date: 2010-02-02.14:34:51
The encoding ISO8859-1 lets any ascii character in (0-255), so the issue is no longer critical for us. The issue may be closed if you want.
msg7017 (view) Author: Alan Kennedy (amak) Date: 2012-04-01.18:56:44
If there any characters that are invalid according to the declared encoding, even if in comments, they will break at the lexical aalysis stage, before the parser even seems them.

I think this bug should be closed, and it appears that the requester agrees.
msg7021 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-04-03.15:22:56
Agreed, closing.
History
Date User Action Args
2012-04-03 15:22:56fwierzbickisetstatus: open -> closed
resolution: wont fix
messages: + msg7021
2012-04-01 18:56:44amaksetnosy: + amak
messages: + msg7017
2010-02-02 14:34:52itasetmessages: + msg5481
2010-01-25 16:22:53fwierzbickisetnosy: + fwierzbicki
2009-06-19 19:17:37itacreate