pass
_charset_=utf-8

On Thu, Mar 10, 2011 at 12:42 PM, Markus Joschko
<[email protected]>wrote:

> I have some trouble doing some "custom parameter extension" in a filter.
> The filter is executed before the sling servlet. It wraps the current
> request and copies the original request parameters to a new map where
> additional/computed parameters are added as well.
> The modified request (+ parameters) is then passed down to the filter
> chain->sling.
>
> That seemed to work fine until I started to care about the encoding.
> It turns out, that the original request parameters are returned as
> UTF-8 strings to my code when I copy them.
> So in my wrapped request I have a request parameter map that contains
> UTF-8 strings. But Sling expects ISO-8859-1 strings.
>
> That means I only see garbage on my result page. I can circumvent this
> by converting every parameter from the original request to ISO-8859-1
> before putting it into my wrapper request parameter map.
> However given all the code in sling to properly encode request
> parameters I wonder if that is not a bit naive?
>
> Any thoughts?
>
> Thanks,
>  Markus
>

Reply via email to