On Fri, 19 Sep 2003 09:00:44 +0200 "Christoph Strehl" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
