Python 3, ASCII, and UTF-8
Python 3, ASCII, and UTF-8
Posted Dec 23, 2017 16:35 UTC (Sat) by mathstuf (subscriber, #69389)In reply to: Python 3, ASCII, and UTF-8 by vstinner
Parent article: Python 3, ASCII, and UTF-8
The problems I've seen are usually with parsing JSON or XML files and the like. Python2 is fine, but Python3 all of a sudden starts complaining that things aren't ASCII when it encounters UTF-8. The thing is that JSON is defined as UTF-8, so I don't know why Python is being ignorant of things and our XML has the encoding declared at the top of the file.