[Zope-dev] [ZOPE 2.6 B1] Unicode/locale problems withOFS/dtml/properties.dtml

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 30 Sep 2002 08:17:31 +0100


On Saturday 28 Sep 2002 4:38 pm, Florent Guillaume wrote:

> > > (yes, this sucks. The problem is that browsers dont specify the
> > > character encoding used in form submissions. At some point we need =
to
> > > discuss the way forward on this issue....)

> Just to be clear, this is an HTML attribute of the <form> tag. For
> instance:
>
> <form action=3D"foo" ... accept-charset=3D"UTF-8">
>  ...
> </form>
>
> This instructs the browser it should send the content of the form in th=
e
> accepted charset.

Yes, accept-charset could be part of a full solution to this problem, but=
 I=20
dont think it is a whole solution....

Are you suggesting that a method could assume its form submissions would=20
always be made in utf-8? That would cause problems if a submission was ma=
de=20
from:
* some other form that didnt have an accept-charset
* some non-browser code that synthesizes http requests

A further problem is that we want this decoding to be performed in ZPubli=
sher,=20
but that that point in the publishing process it doent know which method =
is=20
going to be called. That means the utf8 assumption cant be made independa=
ntly=20
for each method.=20


One answer to this problem is when browsers include the charset attribute=
 in=20
"multipart/form-data" POST requests. ZPublisher knows unambiguously what=20
encoding was used by the browser.

Sadly I cant see a nice way to do the same for GET requests