Non-ASCII character '\xe8' in file xxx.py on line 8, but no encoding declared
竺国兴
2023-12-01
使用网上某个python程序,编译时报错:
File "xxx.py", line 8 SyntaxError: Non-ASCII character '\xe8' in file xxx.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details 原因是缺少编码类型声明:no encoding declared