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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4