[Python-Dev] open(): set the default encoding to 'utf-8' in Python 3.3?

Antoine Pitrou solipsis at pitrou.net
Tue Jun 28 19:56:33 CEST 2011

On Tue, 28 Jun 2011 13:06:44 -0400
Terry Reedy <tjreedy at udel.edu> wrote:
> As for practicality. Notepad++ on Windows offers ANSI, utf-8 (w,w/o 
> BOM), utf-16 (big/little endian).

Well, that's *one* application. We would need much more data than that.

> I believe that ODF documents are utf-8 
> encoded xml (compressed or not).

XML doesn't matter for this discussion, since it explicitly declares the
encoding. What we are talking about is "raw" text files that don't have
an encoding declaration and for which the data format doesn't specify
any default encoding (which also rules out Python source code, by the

> My original claim for this proposal 
> was/is that even Windows apps are moving to uft-8
> and that someday 
> making that the default for Python everywhere will be the obvious and 
> sensible thing.

True, but that may be 5 or 10 years from now.



More information about the Python-Dev mailing list