Working with UTF-8 encoding in Python source [duplicate]
This question already has answers here: Correct way to define Python source code encoding (6 answers) Closed 6 years ago. Consider: $ cat bla.py u = unicode(‘d…’) s = u.encode(‘utf-8’) print s $ 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 … Read more