Ended up in the wrong mailing list :)
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
--- Begin Message ---
I have test Cocoon2 Chinese support, descipted as following.
1. Change HTML serializer encoding setting in cocoon.xmap:
<map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerializer">
<encoding>GB2312</encoding>
</map:serializer>
thus, HTML returned from C2 has correct charset:
<META http-equiv="Content-Type" content="text/html; charset=GB2312">
2. Change encoding of your XML and XSP file:
<?xml version="1.0" encoding="GB2312"?>
thus, you can type any Chinese character in any XML value or Java variable, browser
will display correctly as you think.
3. C2 and MySQL chinese support
3.1 Add MySQL driver setting in web.xml:
<init-param>
<param-name>load-class</param-name>
<param-value>org.gjt.mm.mysql.Driver</param-value>
</init-param>
3.2 Add MySQL datasource in cocoon.xconf <datasource> section:
<jdbc name="mysql">
<pool-controller min="2" max="10"/>
<dburl>jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=GB2312</dburl>
<user>myuser</user>
<password>mypassword</password>
</jdbc>
3.3 Put mm.mysql.jar to cocoon/lib, and restart Tomcat
Execute cocoon\docs\samples\sql\sql-page.xml.sql in mysql to create test tables.
Modify xsp/esql.xsp, change xml encoding, and change "personnel" to "mysql",
then visit http://localhost:8080/cocoon/xsp/esql,
everything ok!
You must use "useUnicode=true&characterEncoding=GB2312" connection parameter to
support
Chinese string in SQL query string and parameters.
4. Support Chinse in parameters returned from URL or forms action:
<xsp-request:get-parameter name="yourparametername" form-encoding="GB2312"/>
"form-encoding" attribute is not documented in C2 user document.
--- End Message ---
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>