[issue18961] Non-UTF8 encoding line

2021-06-18 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced the same in 3.11: > .\python.bat nonutf8_coding_line.py Running Release|x64 interpreter... > .\python.bat -m tokenize nonutf8_coding_line.py Running Release|x64 interpreter... nonutf8_coding_line.py: error: invalid or missing encoding declaration

[issue18961] Non-UTF8 encoding line

2020-03-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: One issue at a time, please, and issue18960 is already its own issue. In any case, item "1" in "Concepts" of PEP 263 is clear that any deviation from the declared encoding should cause a decoding error. -- ___ Pyth

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about first line? Currently both Python interpreter and the tokenize module decode it from UTF-8 (actually due to bug #18960 Python interprets it twice, in different encodings). PEP 263 says: 1. The complete Python source file should use a single en

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Terry: the comment isn't self-contradictory. Instead, the file constitutes a perfectly fine iso-8859-15 byte sequence (albeit a meaningless one: any byte sequence is perfectly fine iso-8559-15, and, in a comment, any characters are allowed by the Python synta

[issue18961] Non-UTF8 encoding line

2013-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue18961] Non-UTF8 encoding line

2013-09-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Which behavior do you propose to change? Does PEP263 specify the response to a self-contradictory encoding comment? What do you think it should say? I raising is the better behavior. Idle notices that it cannot save the file with iso8859-15 encoding, so it sa

[issue18961] Non-UTF8 encoding line

2013-09-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue18961] Non-UTF8 encoding line

2013-09-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a file which is accepted by Python interpreter but is rejected by the tokenize module. $ ./python nonutf8_coding_line.py $ ./python -m tokenize nonutf8_coding_line.py nonutf8_coding_line.py: error: invalid or missing encoding declaration for 'non