[Python-3000] locale-aware strings ?
paul at prescod.net
Wed Sep 13 08:10:29 CEST 2006
On 9/12/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> > I can assure you
> > that most of the documents that I work with are not in CP436 - they are
> > a combination of ASCII, ISO8859-1, and UTF-8. I would also guess that
> > this is true of many Windows XP (US-English) users. So, for me and users
> > like me, Python is going to silently misinterpret my data.
> No. It will use a different API to determine the system encoding, and
> it will guess correctly.
If Python reports "cp1252" as I expect it to, then it has not "guessed
correctly" for Brian's documents as described above. The mistake will be
harmless for the ASCII files and often for the ISO8859-1 files, but would be
dangerous for the UTF-8 ones.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-3000