Petteri Sulonen wrote:
(1) Check your web.xml. You should have the init-param "form-encoding" set to "UTF-8". (It's set by default to ISO-8859-1 on at least some versions of Cocoon.)

/var/lib/tomcat5/webapps/cocoon/WEB-INF/web.xml says:

    <!--
      Set encoding used by the container. If not set the ISO-8859-1 encoding
      will be assumed.
      Since the servlet specification requires that the ISO-8859-1 encoding
      is used (by default), you should never change this value unless
      you have a buggy servlet container.
    -->
    <init-param>
      <param-name>container-encoding</param-name>
      <param-value>ISO-8859-1</param-value>
    </init-param>

    <!--
      Set form encoding. This will be the character set used to decode request
      parameters. If not set the ISO-8859-1 encoding will be assumed.
    -->
    <init-param>
      <param-name>form-encoding</param-name>
      <param-value>ISO-8859-1</param-value>
    </init-param>

I changed both to UTF-8. No effect.

Incidentally, why is 8859-1 the default when XML's default is UTF-8? This seems deeply suboptimal.

(2) Check your sitemaps, starting from the Cocoon root sitemap. You can set the encoding of your serializers there, for example

<map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer">
       <encoding>UTF-8</encoding>
     </map:serializer>

...under /map:sitemap/map:components/map:serializers.

That did it. Very many thanks. There was no encoding element type in there, so it would have been inheriting the default.

Is there some problem in making UTF-8 the default in the distro?

///Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to