Dear Reinhard, dear Cocoon-users,

I was asked to give a short explanation on how to use Cocoon for
non-roman languages - especially Arabic - which should be of use for
Chinese as well.

I'm not too firm in using Cocoon, so please feel free to correct or
extend this.


All files have to be saved as utf-8, so make sure to add/change the
first line of your xml/xsl-files:

        <?xml version="1.0" encoding="UTF-8"?>

In sitemap.xmap I added the following to each serializer:

        <map:serializer logger=...>
                <encoding>UTF-8</encoding>
        </map:serializer>

This adds the following META-Tag to the serialized document:

        <META http-equiv="Content-Type" content="text/html;
charset=UTF-8">

Then I set the following parameters in web.xml...

        <init-param>
                <param-name>container-encoding</param-name>
                <param-value>ISO-8859-1</param-value>
        </init-param>
        <init-param>
                <param-name>form-encoding</param-name>
                <param-value>UTF-8</param-value>
        </init-param>

... to make sure the forms are processed correctly.

On the client side at least Windows 2000 (I don't know about Linux or
Mac) must be used with the keyboard settings set up to allow
Arabic/Chinese typing. If you only need to display non-roman characters,
this also works with any system and a browser that supports
Unicode-display. IE5+ for example downloads the necessary fonts
automatically when needed.

I remember having some troubles using Tomcat 4.1.29, but 4.1.18 works
fine. I don't have any experiences with any other version or
servlet-container.


I only can't explain why the container-encoding in web.xml has to be set
to ISO-8859-1. If anybody knows about this, please add it to this text.
Any other setting I tried to use didn't work out.


I hope I could make a small contribution to the growing
cocoon-community...


Jasper Michalczik




-----Urspr�ngliche Nachricht-----
Von: Reinhard Poetz [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 28. Mai 2004 14:58
An: [EMAIL PROTECTED]
Betreff: Re: AW: Has anyone used Cocoon for chinese language application
?

Jasper Michalczik wrote:

>Hello Vincent,
>
> 
>
>I developed an application with Arabic contents using cocoon. I didn�t
>have any trouble yet, my xml files are stored as utf8, but I don�t have
>any experiences with utf16. You only need to make sure that the form
>encoding is set accordingly, if you plan to use formulars.
>  
>


Do you mind preparing a small sample (including instructions what you 
need on the client-side)? If not, file a Bugzilla report 
(http://nagoya.apache.org/bugzilla/index.html) and I add them to the 
Cocoon samples.

-- 
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to