[Zope3-dev] i18n, unicode, and the underline

Martijn Faassen faassen@vet.uu.nl
Sun, 13 Apr 2003 15:10:42 +0200


Guido van Rossum wrote:
> So I don't see how an application could get away with using "..." 
> containing non-ASCII text at all -- it would fail as soon as the
> literal was being output.

Note that in Zope 2 (at least until 2.6 which is a bit better) this can lead to
obscure unicode errors occuring in unexpected places, dependent on user input
and so on. I now know how python's unicode system works, but most Python
developers really don't, in my experience. The bugs are nasty to track down
and don't encourage developer enlightenment either - the response is "oh, one of
these unicode weird errors again", without understanding what the right
approach should be.

Now in Zope 3 this unicode confusion may not take place as Zope 3 is
unicode in the core, and input and output are frequently automatically
translated. If confusion is indeed less, using ascii literals may be easy to 
explain. But if it would lead to anything like the Zope 2.x situation,
where non-ascii user input can cause the system to complain at 
unexpected code paths, then let's please remain hard-line (even
to the point of silliness) about unicode.

It's far easier to explain "use unicode everywhere" than to explain the
other alternatives.

Regards,

Martijn