You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Perez Carmona, David" <DP...@fcc.es> on 2004/07/20 13:09:01 UTC

Query string with non-English characters

Dear Cocooners,

I have a form and insert some non-English characters in a text box, with Mozilla 1.5 or IE 6 under Windows XP.
When the action that process the form, receives these characters badly.  It is clearly an encoding problem.
I'm using Cocoon 2.1.2

The solution to my problem is solved by this:
    ObjectModelHelper.getRequest(objectModel).setCharacterEncoding("UTF-8");

    ObjectModelHelper.getRequest(objectModel).getCharacterEncoding() returns null

My server runs also under Windows.

Is this a bug?
Shouldn't be UTF-8 the default encoding?

David


*************************************************************
Este correo ha sido procesado por el antivirus del Grupo FCC.
*************************************************************

Re: Query string with non-English characters

Posted by Joerg Heinicke <jo...@gmx.de>.
On 20.07.2004 13:09, Perez Carmona, David wrote:

> I have a form and insert some non-English characters in a text box, with Mozilla 1.5 or IE 6 under Windows XP.
> When the action that process the form, receives these characters badly.  It is clearly an encoding problem.
> I'm using Cocoon 2.1.2
> 
> The solution to my problem is solved by this:
>     ObjectModelHelper.getRequest(objectModel).setCharacterEncoding("UTF-8");

This should be done using param form-encoding in cocoon.xconf (or was it 
web.xml?).

>     ObjectModelHelper.getRequest(objectModel).getCharacterEncoding() returns null

This is because no browser sets the character encoding header of the 
request.

> My server runs also under Windows.
> 
> Is this a bug?
> Shouldn't be UTF-8 the default encoding?

The encoding for reading the request (n) should be the same as for 
serializing the response (n-1).

http://wiki.apache.org/cocoon/RequestParameterEncoding

Joerg


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