[Python-3000] locale-aware strings ?
David Hopwood
david.nospam.hopwood at blueyonder.co.uk
Wed Sep 6 02:36:10 CEST 2006
David Hopwood wrote:
> I don't know about vi, but notepad will open and save files that are not in
> the system ("ANSI") encoding just fine. On opening it checks for a BOM and
> auto-detects UTF-8 and UTF-16; on saving it will write a BOM if you choose
> "Unicode" (UTF-16LE), "Unicode big-endian" (UTF-16BE), or UTF-8 in the
> Encoding drop-down box.
... and it also helpfully prompts you to select a Unicode encoding, if you
forget and the file contains characters that are not representable in the ANSI
encoding.
> This is exactly the behaviour that most users would expect of a well-behaved
> Unicode-aware app. It should be as easy as possible to match this behaviour
> in a Python program.
--
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>
More information about the Python-3000
mailing list