[Zope3-checkins] CVS: Zope3/lib/python/Zope/Server/VFS/tests - PosixFilesystemTests.py:1.3 WriteFilesystemTests.py:1.4

Martijn Faassen faassen@vet.uu.nl
Thu, 18 Jul 2002 22:44:42 +0200


Guido van Rossum wrote:
> Didn't Jim make a papal edict that all (text) strings in Zope3 have to
> be Unicode strings?  That would mean that eventually (almost)
> everything will be Unicode.

Everything but a large section of code that has to deal with the
outside world -- the network, the filesystem, relational
databases, binary data that contains textual information, and probably
other areas I didn't think of. Those aren't 'text strings', I guess, though
in many cases nobody can see the difference. :)

It's of particular importance that we flesh out the interface between
the non-unicode world (if unicode leaks into the network layer, that's
likely a bug, for example) and the unicode world (content). I haven't
seen a lot of discussion on this yet, but we'll have to tackle it
sooner or later.

It means hunting for occurences of str() -- for
instance, lib/python/Zope/TAL/TALInterpreter.py contains a str() that
last I checked made the use of unicode impossible with PageTemplates,
and there'll be much more of that. It means guidelines on what data
the outside world (say the network) is commonly sending; HTTP doesn't
seem to say what encoding data is in when you submit a form, so we'll
have to assume something. And so on. It needs to end up clean and easy
for application programmers in the end, so that they don't need to
remember a lot about encoding all the time. So having everything in
unicode is a good idea as long as the interface with the 8 bit world
is taken care of properly. Otherwise developers will have to suffer
through a lot of encoding errors.

Regards,

Martijn