[Python-3000] locale-aware strings ?
murman at gmail.com
Wed Sep 6 20:28:09 CEST 2006
On 9/6/06, Paul Prescod <paul at prescod.net> wrote:
> On 9/6/06, Michael Urman <murman at gmail.com> wrote:
> > ... I suspect the best option is some sort of TextFile
> > constructor that defaults to ASCII (or has no default) but accepts an
> > easy way to use the "recommended" or system encoding, or any explicit
> > one.
> That's exactly what I'm asking for.
I suspect the difference in attitudes between us and those who don't
want explicit encodings is that we've dealt with the mess of
extracting information from various sources that use arbitrary
encodings, either indicated incorrectly or not at all, and we want
Python to help break that cycle. Those who want the ease of a TextFile
constructor which magically supplies the "recommended" (local?)
encoding might only deal with data in their local encoding, and aren't
aware that code like theirs provides the problem case for those who
deal with more. Not because a text file in the local encoding is a
problem, but because if they're not thinking of encoding there, they
won't where it matters.
I have to learn more about the Japanese distaste for the Unicode
system, but I don't see how that could influence me into accepting,
e.g., ms932 as a silently-requested encoding. Do you have any clue if
or where that fits in?
Michael Urman http://www.tortall.net/mu/blog
More information about the Python-3000