[Zope-CMF] Charsets

Charlie Clark charlie at begeistert.org
Sun Jan 25 06:38:26 EST 2009


Am 25.01.2009 um 08:35 schrieb Dieter Maurer:

> Wow. Some magic in "formlib" deviating from the Zope2 standard  
> behaviour....

Maybe. But then formlib is not really a standard Zope 2 approach. The  
one thing I do find weird is that PreferredCharsets() is called for  
each field in a form.

> But, if this is true, we do not understand Charlie's observations:
>
>  When I understood him right, he is using formlib and he is observing
>  problems with the charsets.
>
>  He found out that this has to do with IE browsers sending an
>  empty "Accept-Charsets" header which is turned by Zope's
>  "preferredCharset" into "iso-8859-1".
>
>  But when the same charset is used on both form delivery and
>  on form processing he should not see a problem with mismatched
>  encodings.

Actually the problems occur as soon as you use different browsers with  
non-ASCII text.

> Of course, "iso-8859-1" may not be approriate for form delivery --
> and may result in funny special characters in non-western countries.


As Daniel noted UTF-8 should be default. I had a quick look at the  
source of the appropriate module and couldn't see where the broken  
"magic" was happening. It's probably a bit beyond me but is the first  
thing to write a test that we know currently breaks?

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the Zope-CMF mailing list