cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koeppe <koe...@rbg.informatik.tu-darmstadt.de>
Subject form encoding UTF-8 / ISO-8859-1
Date Mon, 13 Jan 2003 15:05:13 GMT

Hello,

I'm using a recent developer version of cocoon 2.1 (Jan 9 2003),
tomcat 4.1.12 on SuSE Linux 8.0 Kernel 2.4.20,
and I found a problem with parsing the request parameters from a GET
request:

The browser (both Mozilla and IE) sends them as UTF-8, but cocoon
interprets them as ISO-8859-1. The problem can be seen e.g. with form
validator: if you enter a non-ASCII7 character, and there is something not
correct for the form validator within ANOTHER field, you get the first
field back changed.

I have enabled "container-encoding" and "form-encoding" in web.xml, and
set both to "utf-8", but with no success (no change in behaviour).

1) Can someone help?


I looked at the source, too:
org.apache.cocoon.environment.http.HttpRequest

There are getCharacterEncoding() and setCharacterEncoding().
Whereas get...() is mapped to the servlet engine function,
set...() seems to be implemented within cocoon.

In my experiments a call to set...("UTF-8") directly before reading the
parameters within a flow script didn't work, either. (no change)
get...() always returned null.

2) Can someone explain the idea of the set...() function, in combination
with decode(), i.e. why that should work? Or: what should be done to get
it work?

3) Why doesn't get...() return the value that was set before with
set...(), i.e. why is the servlet value returned, whereas the cocoon
internal value seems to be used?


Thanks in advance

Martin Koeppe

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message