Tag Archives: SyntaxError: Non-ASCII character ‘\xe2‘ in file

SyntaxError: Non-ASCII character ‘\xe2‘ in file

syntax error: non ASCII character ‘\ xe2’ in file means that there are non ASCII characters in the file

ASCII is 8 bits, that is, a character, a total of 256 characters. With the development of computer, 2 or 4 characters have been used now

it is suggested to add the following in [file header]:

1

2

3

#-*- coding:cp936- *-

or

#-*- coding:utf-8- *-

or

?Coding = UTF-8

more complex forms need to be encoded and decoded

undertake MATLAB, Python and C + + programming, machine learning, computer vision theory implementation and guidance, undergraduate and master can, salted fish trading, professional answer please go to know, for details, please contact QQ number 757160542, if you are the one

This article shares in the blog “Yu Xiaoyong” (CSDN).