Message407419
I confirm: Python 3.10 works as expected.
Python 3.10 fails with the same SyntaxError using "python script.py" or "python -m script" if the script contains non-ASCII characters but is not encoded to UTF-8.
vstinner@apu$ python3 test.py
File "/home/vstinner/test.py", line 1
print('�Hello world!')
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte
vstinner@apu$ python3 -m test
Traceback (most recent call last):
(...)
File "/home/vstinner/test.py", line 1
print('�Hello world!')
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte |
|
Date |
User |
Action |
Args |
2021-12-01 00:45:37 | vstinner | set | recipients:
+ vstinner, loewis, ncoghlan, benjamin.peterson, jwilk, r.david.murray, serhiy.storchaka, eryksun, iritkatriel |
2021-12-01 00:45:37 | vstinner | set | messageid: <1638319537.69.0.980601947514.issue19941@roundup.psfhosted.org> |
2021-12-01 00:45:37 | vstinner | link | issue19941 messages |
2021-12-01 00:45:37 | vstinner | create | |
|