Paul Moore writes:

 > So I think that if this discussion is to be of any real benefit, a
 > specific example is needed. I honestly don't think I've ever
 > encountered a case where "Sometimes [I] just want to parse text
 > files" and code that uses the default encoding (i.e., looks pretty
 > much identical to Python 2) has *failed* to do the job for me.

I don't understand why it fails for Kristján, but I can tell you why
it failed for me:  Mac OS X "Snow Leopard" (at least on my box, and
perhaps due to my misconfiguration) doesn't set the locale variables
and for some reason the fallback for locale.getpreferredencoding() is
not UTF-8 (== sys.getfilesystemencoding()) nor some Japanese encoding
(Japanese is my system language), but US-ASCII!

Naturally, putting LANG=ja_JP.UTF-8 in my shell startup fixed that
once and for all, so as I say I don't understand why Kristján has a
problem.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to