[Python-ideas] Python 3 open() text files: make encoding parameter optional for cross-platform scripts

Steven D'Aprano steve at pearwood.info
Tue Jun 11 02:23:24 CEST 2013


On 10/06/13 22:40, Stephen J. Turnbull wrote:

> UTF-8 *is* the future.  Only Microsoft disagrees, and that doesn't
> really matter because Microsoft's plan for world domination involves
> proprietary binary file formats rather than text files in a standard
> encoding.  [...]
> On the other hand,
> problems with conflicting defaults across systems are "business as
> usual", and nobody's going to blame Python for that.

Well said.

Compatibility with local files is more important than universal compatibility. When users on Windows systems cannot easily and reliably read their own text files created with other tools, it will be no comfort to tell them "Yes, but we've solved the problem of you reading files transferred from another machine! Well, almost solved. Provided the other machine is using UTF-8, and the file transfer program doesn't screw something up."



-- 
Steven


More information about the Python-ideas mailing list