On 11 August 2016 at 00:30, Random832 firstname.lastname@example.org wrote:
Python could copy how configure_text_mode() handles the BOM, except it shouldn't write a BOM for new UTF-8 files.
I disagree. I think that *on windows* it should, just like *on windows* it should write CR-LF for line endings.
Tools like git and hg, and cross platform text editors, handle transparently managing the differences between line endings for you. But nothing much handles BOM stripping/adding automatically. So while in theory the two cases are similar, in practice lack of tool support means that if we start adding BOMs on Windows (and requiring them so that we can detect UTF8) then we'll be setting up new interoperability problems for Python users, for little benefit.