cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Владимир Юрьев" <vyur...@rambler.ru>
Subject Re: JSPGen. RequestParameter Encoding
Date Fri, 19 Sep 2003 09:15:23 GMT
On Fri, 19 Sep 2003 09:00:44 +0200
  "Christoph Strehl" <christoph.strehl@epost.de> wrote:
>Hello again,
>
>special characters in the request parameter in my JSP are somehow
>encrypted and even using java.net.URLDecoder.decode() doesn't change
>that. I tried to set the encoding to "ISO-8859-1" but it didn't work 
>at
>all. Has anyone had a similar problem yet? 
>
>I am grateful for any hint.
>
>Christoph
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>

Hi,Christoph!

My experience small in use JSP, if you asked, how inquiry with HTML as 
Parameter name = "query" to receive with the coding distinct from 
ISO-8859-1, I did(made) it as follows:

myfile.jsp:
...
String requestEnc = request.getCharacterEncoding();
if( requestEnc==null ) requestEnc="ISO-8859-1";
String clientEnc = request.getParameter("charset");
if( clientEnc==null ) clientEnc="Cp1251";
String queryString = new 
String(request.getParameter("query").getBytes(requestEnc),clientEnc);
...

Vladimir Yuryev.

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


Mime
View raw message