←back to thread

238 points GalaxySnail | 1 comments | | HN request time: 0.248s | source
1. anordal ◴[] No.40173826[source]
The following heuristic has become increasingly true over the last couple of decades: If you have some kind of "charset" configuration anywhere, and it's not UTF-8, it's wrong.

Python 2 was charset agnostic, so it always worked, but the improvement with Python 3 was not only an improvement – how to tell a Python 3 script from a Python 2 script?

* If it contains the string "utf-8", it's Python3.

* If it only works if your locale is C.UTF-8, it's Python3.

Needless to say, I welcome this change. The way I understand it, it would "repair" Python 3.