[Zope-Coders] Re: [Zope-dev] Unicode treatment in 2.6b1

Guido van Rossum guido@python.org
Mon, 30 Sep 2002 10:47:24 -0400


> > Because if, say, some Greek guy puts 8-bit strings in the source
> > of his pages (and believe me he does it all the time :-), and in
> > the attributes of objects, they're all likely to be in *his*
> > native default encoding, which happens to be latin-7. Until
> > Unicode was in, he just had to slap a content-type: text/html;
> > charset=iso-8859-7 and all was well. Same thing for Russian,
> > Japanese, etc. My point is that it is very likely that there was a
> > uniformity of encodings (otherwise the application would already
> > render weirdly on the browsers).
> 
> Yes. I can see that alot of legacy zope had to work that way. So far
> I had assumed that this practice would die out once unicode support
> was available throughout the framework, and books. Any thoughts on
> this?

It'll be a long time before the 8-bit+encoding approach is abandoned,
at least in areas of the world where 8 bits are enough to encode the
local alphabet + ASCII.  I think the reason is mostly inertia.
Everybody has their favorite tools and tricks that they have been
using and improving for decades, while the Unicode tools are still
young and rough.  Example: I have no need for Unicode, so my Linux
environment doesn't have *any* Unicode tools (that I'm aware of
anyway).  In fact, I have hardly a need for aything beyond ASCII, and
the only encoding I'm likely to use is Latin-1, for the occasional
accented French or German name.  My environment has extensive support
for these though, and while everything defaults to Latin-1
--undoubtedly because I gave Latin-1 as my preference when I installed
Linux-- it's easy enough to set up support for a different Latin
encoding variant.

Python 2.3 makes it easier to use encodings and Unicode together: a
Python source file can be encoded using a legacy encoding, and Unicode
literals containing legacy-encoded non-ASCII characters will do the
right thing.  But it'll be a while before this feature hits the
streets...

So let's all be patient.

--Guido van Rossum (home page: http://www.python.org/~guido/)