File "test.py", line 2
SyntaxError: Non-ASCII character '\xe4' in file test.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
如果运行python脚本过程中出现如下问题:可以在文件开头加入:
# -*- coding: UTF-8 -*- 或者:#coding=utf-8
File "test.py", line 2
SyntaxError: Non-ASCII character '\xe4' in file test.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
如果运行python脚本过程中出现如下问题:可以在文件开头加入:
# -*- coding: UTF-8 -*- 或者:#coding=utf-8
本文标题:python编码
本文链接:https://www.haomeiwen.com/subject/flmszttx.html
网友评论