[Zope3-dev] i18n, unicode, and the underline
Martijn Faassen
faassen@vet.uu.nl
Mon, 14 Apr 2003 17:41:46 +0200
Shane Hathaway wrote:
[snip]
> Making everything aware of encodings would certainly be bad, I agree. I
> intended the first interpretation.
So what your saying is that all functions should make sure their output
is unicode if they're not dealing with bytes? I guess that would be
less programmer overhead, and it would catch mistakes with unicode
earlier, but I see far more value in making sure I/O is handled
well and everything inputted is already proper unicode.
> BTW Java, in spite of its deficiencies, got Unicode right by making it
> the default, and I'm happy to see Python learn from the same experience.
> Have you considered the possibility of adding a __future__ statement to
> make Python create Unicode objects insteads of strings by default? (But
> for all I know, that could already be done or rejected. Feel free to
> say so. :-) )
One of the problems with that is that it won't help with modules you don't
have any control over but that you're using in some fashion.
Unless this future does a global override, which I think would create
huge problems with code that *needs* bytes. :)
Regards,
Martijn