[ZPT] response.setHeader() best practice

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 09 Apr 2002 16:41:26 +0100


On Tue, 9 Apr 2002 10:41:38 EST5EDT, Alan Kennedy <zpt@xhaus.com>
wrote:

>2. UTF-16 is wasteful of bandwidth if you're only using <=20
>200 characters out of the 64K range (unless you're using=20
>compression, but that's another issue)=20

There is another argument against utf-16 in Zope 2. ZPublisher looks
at the content of the post-character-encoding body to perform a number
of evil tricks, such as injecting the <base href=3D""> tag. These evil
tricks only work when using character encodings that are sufficiently
close to ascii that ZPublisher can find <head> tags, etc.

I understand this will not be a problem in Zope 3

Toby Dickenson
tdickenson@geminidataloggers.com