如何解决windwos 系统与linux系统的汉字编码不一致问题?(SystaxError:Non-ASCII character '\xe6' int the......)

当我们把windwos的程序移到Linux上运行可能会出现SystaxError:Non-ASCII character '\xe6' int the  某个文件

这时我们需要打开这个文件然后在这个文件开头添加上:#  encoding: utf-s

退出保存就可以了。

猜你喜欢

转载自blog.csdn.net/a2392008643/article/details/83652244