cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <>
Subject [C2] request encoding
Date Mon, 09 Jul 2001 12:10:51 GMT
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?

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message