cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: request taglib and parameters encoding
Date Mon, 15 Jan 2001 18:13:28 GMT
On Mon, 15 Jan 2001, [iso-8859-1] MORÁVEK Peter wrote:

> when I use the <request:get-parameter ...> tag to retrieve client entered
> value with slovak characters (not ISO-8859-1),
> I become instead of the characters just question mark characters '?'. I know
> that I it so because the servlet engine (I use JRun 3.0) don't use the right
> encoding to retrieve data from the stream.
> The only way I can retrieve the right data from the request is to do the
> character conversion:
> String encoding = "Cp1250";
> String incorrect = request.getParameter("name");
> String correct = new String(incorrect.getBytes(), newEncoding);
> Does anybody already patched the request tag library to support different
> encodings so I don't have to do it on my self and later replace it with
> default behaviour of the cocoon.

it doesn't seem like you want to patch the request library here, since the
encoding change routine is something you might want to do to any string.
how about a new namespace:

  <request:get-parameter name="name"/>

to make it more succinct, you could have a top-level default to encoding:

<encoding:to type="default">Cp1250</encoding:to>

- donald

View raw message