GET urls are latin-1 encoded.

Looks like get urls are latin-1 encoded.

Wrapping the request and recoding looks like it works.

protected void doGet(final HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // GET doesnt do UTF-8 encoding even URL, take the default encoding of the machine HttpServletRequestWrapper httprequest = new HttpServletRequestWrapper(request) { @Override public String getParameter(String name) { String param = request.getParameter(name); try { return new String(param.getBytes(”ISO-8859-1″),”UTF-8″); } catch (UnsupportedEncodingException e) { return param; } } }; execute(httprequest, response); }

Comments

Leave a Reply




This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a