cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jos Snellings <>
Subject character encoding of a HttpServletRequest
Date Sat, 09 Jan 2010 07:01:16 GMT

HttpServletRequest looks 'imperfect':
Cocoon 3, alpha 2.
A generator accesses the HttpServletRequest in the setup method:

request = HttpContextHelper.getRequest(parameters);
text = request.getParameter("tekst");

The pages, including forms are ecoded in utf-8.
The String 'text' is strange: the original content (utf-8) is encoded
once again:
if the string on the form was one character, say 'é', the string has a
length of 4 bytes. It is the result of utf-8 encoding the two byte
character coming from the client. So, a second conversion is happening.

new String(request.getParameter("text").getBytes("ISO-8859-1")) works

Where should this be corrected?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message