Yet another unicode WTF

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


In article <nad-31678A.00033005062009 at ger.gmane.org>,
 Ned Deily <nad at acm.org> 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!

http://bugs.python.org/issue6202

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list