[Python-Dev] international python
Fredrik Lundh
fredrik at pythonware.com
Fri Sep 9 12:15:25 CEST 2005
Antoine Pitrou wrote:
> - seamless unicode support: how about making the default Python
> charset utf-8 instead of ascii ? right now, someone (say an American or
> English) who does not design his app with non-ascii characters in mind
> may have a surprise when users enter those characters in customizable
> fields: for example, debug print statements which end up crashing the
> app with an UnicodeException on the user's machine, without even a way
> to diagnose this when the app is a GUI app and stdout is not shown ;))
using a variable-width default encoding will break stuff that expect string
lengths to be constant, or just prefer their character and slice indices to stay
where they are.
defaulting to "replace" (or better, an escaping UnicodeEncodeError handler)
on the standard output channels would be a better idea.
</F>
More information about the Python-Dev
mailing list