You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Björn Voigt <bv...@hs-harz.de> on 2004/08/05 13:48:30 UTC

form-enconding in web.xml doesn't take effect

Hello list,

I run a cocoon (2.1.5) site with UTF-8 encoding and use the lucene 
search generator.
The site is correctly serialized with UTF-8. If I fill the search form 
with a query string
containig german umlauts, the parameter is also correctly encoded.

(I run it in JETTY)

I have changed the form-encoding in web.xml to UTF-8, but it seems, that 
the request
paramters still be ISO-8859 decoded. I have tested it with

			Request request = ObjectModelHelper.getRequest(objectModel);
			//Encode the wrong decoded string back to original
			String wert = 
URLEncoder.encode(request.getParameter("queryString"),"ISO-8859-1");
			//Decode it with UTF-8
			wert = URLDecoder.decode(wert,"UTF-8");
			System.out.println(wert);

and got the right


What could be happen?

regards

Björn


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


Re: form-enconding in web.xml doesn't take effect

Posted by Björn Voigt <bv...@hs-harz.de>.
Marc Portier wrote:
> have you changed only form-encoding to utf-8 ?
> the container-encoding in web.xml should remain default...
> 
> regards,
> -marc=
> 
> 
> 
> Björn Voigt wrote:
> 
>> Hello list,
>>
>> I run a cocoon (2.1.5) site with UTF-8 encoding and use the lucene 
>> search generator.
>> The site is correctly serialized with UTF-8. If I fill the search form 
>> with a query string
>> containig german umlauts, the parameter is also correctly encoded.
>>
>> (I run it in JETTY)
>>
>> I have changed the form-encoding in web.xml to UTF-8, but it seems, 
>> that the request
>> paramters still be ISO-8859 decoded. I have tested it with
>>
>>             Request request = ObjectModelHelper.getRequest(objectModel);
>>             //Encode the wrong decoded string back to original
>>             String wert = 
>> URLEncoder.encode(request.getParameter("queryString"),"ISO-8859-1");
>>             //Decode it with UTF-8
>>             wert = URLDecoder.decode(wert,"UTF-8");
>>             System.out.println(wert);
>>
>> and got the right
>>
>>
>> What could be happen?
>>
>> regards
>>
>> Björn
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
> 
yes I have, this was the first, I  also read the encoding wiki, but it
is still ISO-8859 decoded.


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


Re: form-enconding in web.xml doesn't take effect

Posted by Marc Portier <mp...@outerthought.org>.
have you changed only form-encoding to utf-8 ?
the container-encoding in web.xml should remain default...

regards,
-marc=



Björn Voigt wrote:
> Hello list,
> 
> I run a cocoon (2.1.5) site with UTF-8 encoding and use the lucene 
> search generator.
> The site is correctly serialized with UTF-8. If I fill the search form 
> with a query string
> containig german umlauts, the parameter is also correctly encoded.
> 
> (I run it in JETTY)
> 
> I have changed the form-encoding in web.xml to UTF-8, but it seems, that 
> the request
> paramters still be ISO-8859 decoded. I have tested it with
> 
>             Request request = ObjectModelHelper.getRequest(objectModel);
>             //Encode the wrong decoded string back to original
>             String wert = 
> URLEncoder.encode(request.getParameter("queryString"),"ISO-8859-1");
>             //Decode it with UTF-8
>             wert = URLDecoder.decode(wert,"UTF-8");
>             System.out.println(wert);
> 
> and got the right
> 
> 
> What could be happen?
> 
> regards
> 
> Björn
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

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


Re: form-enconding in web.xml doesn't take effect

Posted by go...@osmosis.gr.
i use encoding action
without problem


<map:act type="set-encoding">
        <map:parameter name="form-encoding" value="UTF-8"/>
</map:act>


-- stavros 


On Thu, 5 Aug 2004, [ISO-8859-1] Bjφrn Voigt wrote:

> Hello list,
> 
> I run a cocoon (2.1.5) site with UTF-8 encoding and use the lucene 
> search generator.
> The site is correctly serialized with UTF-8. If I fill the search form 
> with a query string
> containig german umlauts, the parameter is also correctly encoded.
> 
> (I run it in JETTY)
> 
> I have changed the form-encoding in web.xml to UTF-8, but it seems, that 
> the request
> paramters still be ISO-8859 decoded. I have tested it with
> 
> 			Request request = ObjectModelHelper.getRequest(objectModel);
> 			//Encode the wrong decoded string back to original
> 			String wert = 
> URLEncoder.encode(request.getParameter("queryString"),"ISO-8859-1");
> 			//Decode it with UTF-8
> 			wert = URLDecoder.decode(wert,"UTF-8");
> 			System.out.println(wert);
> 
> and got the right
> 
> 
> What could be happen?
> 
> regards
> 
> Bjφrn
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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