美文网首页
python编码

python编码

作者: 随玉而安_gao | 来源:发表于2017-04-22 16:33 被阅读0次

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