Error: How do I resolve the Non-ASCII character '\xe2' in file?
It doesn't pop up when I use English, but it only pops up when there is Korean
$ cat bla.py
print "Hi!"
$ $ python bla.py
File "bla.py", line 1 SyntaxError: Non-ASCII character '\xe2' in file bla.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
python encoding utf-8 character-encoding
#!/usr/bin/env python
# # -*- coding: utf-8 -*-
Please add something to the top. Then you can write UTF-8 to the string.
$ cat mine.py
#!/usr/bin/env python
# # -*- coding: utf-8 -*-
print "Hi!"
$ $ python mine.py
Good-bye!
© 2024 OneMinuteCode. All rights reserved.