Add this line at the top of you code. It may work.
# coding=utf8
More Related Contents:
- Saving utf-8 texts with json.dumps as UTF8, not as \u escape sequence
- Why should we NOT use sys.setdefaultencoding(“utf-8”) in a py script?
- u’\ufeff’ in Python string
- Unicode (UTF-8) reading and writing to files in Python
- Url decode UTF-8 in Python
- error UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte
- Python and BeautifulSoup encoding issues [duplicate]
- Dangers of sys.setdefaultencoding(‘utf-8’)
- How to convert a string to utf-8 in Python
- How do I check if a string is unicode or ascii?
- python requests.get() returns improperly decoded text instead of UTF-8?
- General Unicode/UTF-8 support for csv files in Python 2.6
- printing UTF-8 in Python 3 using Sublime Text 3
- MySQL “incorrect string value” error when save unicode string in Django
- How to print UTF-8 encoded text to the console in Python < 3?
- How to display utf-8 in windows console
- How to correctly parse UTF-8 encoded HTML to Unicode strings with BeautifulSoup? [duplicate]
- Why declare unicode by string in python?
- ‘utf-8’ codec can’t decode byte 0xa0 in position 4276: invalid start byte
- Python reading from a file and saving to utf-8
- Should I use encoding declaration in Python 3?
- Loading UTF-8 file in Python 3 using numpy.genfromtxt
- Python DictWriter writing UTF-8 encoded CSV files
- UnicodeDecodeError: (‘utf-8’ codec) while reading a csv file [duplicate]
- ElementTree and unicode
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-5: ordinal not in range(128) [duplicate]
- Convert UTF-16 to UTF-8 and remove BOM?
- python encoding utf-8
- UTF-8 HTML and CSS files with BOM (and how to remove the BOM with Python)
- Python CGI – UTF-8 doesn’t work