You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/07/09 14:10:51 UTC
[C2] request encoding
Shouldn't the request parameters be UTF-8 encoded
by default?!
In our forms we need to use some German characters.
But the only way I can save them is to translate them
by myself.
String p = request.getParameter("whatever");
if (p != null){
byte[] s = p.getBytes("8859_1");
String value = new String(s, 0, s.length, "UTF-8");
}
Shouldn't this be a thing the servlet engine should
take care of? (BTW: We are using Tomcat 4b3 right now)
Maybe by specifing the encoding within the html page?
C2 inserts by default:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
I tried to change this in cocoon.xconf:
<map:serializers default="html">
<map:serializer type="html" mime-type="text/html" src="...">
<encoding value="ISO-8859-1"/>
...but this throws a ConfigurationException
Any idea?
--
Torsten
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: [C2] request encoding
Posted by Torsten Curdt <tc...@dff.st>.
> I tried to change this in cocoon.xconf:
Ups... I was talking about the sitemap
>
> <map:serializers default="html">
> <map:serializer type="html" mime-type="text/html" src="...">
> <encoding value="ISO-8859-1"/>
>
> ...but this throws a ConfigurationException
>
> Any idea?
I have had look... it must be
<encoding>ISO-8859-1</encoding>
Now it works...
--
Torsten
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>