Yet another unicode WTF

Ned Deily nad at
Fri Jun 5 13:22:41 EDT 2009

In article <nad-31678A.00033005062009 at>,
 Ned Deily <nad at> wrote:
> In python 3.x, of course, the encoding happens automatically but you 
> still have to tell python, via the "encoding" argument to open, what the 
> encoding of the file's content is (or accept python's default which may 
> not be very useful):
> >>> open('foo1','w').encoding
> 'mac-roman'
> WTF, indeed.

BTW, I've opened a 3.1 release blocker issue about 'mac-roman' as a 
default on OS X.  Hard to believe none of us has noticed this up to now!

 Ned Deily,
 nad at

More information about the Python-list mailing list