[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Andrew Ushakov report at bugs.python.org
Tue Apr 13 03:09:58 EDT 2021


Andrew Ushakov <andrew.ushakov at gmail.com> added the comment:

Just tested again:

D:\Downloads>py                                                                                                                                           
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr  4 2021, 13:27:16) [MSC v.1928 64 bit (AMD64)] on win32                                                            
Type "help", "copyright", "credits" or"license" for more information.                                                                                    
>>> quit()
                                                                                                                                                                                                                                                                                                          D:\Downloads>py tst112.py                                                                                                                                 
SyntaxError: Non-UTF-8 code starting with '\xe2' in file D:\Downloads\tst112.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details 

P.S. No problems with Python 3.8.5 and Ubuntu 20.04.2 LTS.

----------
versions: +Python 3.7, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38755>
_______________________________________


More information about the Python-bugs-list mailing list