[ 
https://issues.apache.org/jira/browse/SLING-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Maestroni resolved SLING-1879.
-------------------------------------

    Resolution: Not A Problem

The encoding is set through the _charset_ parameter, anyway I would expect that 
the encoding set in the Content-Type header is used when _charset_ is missing, 
and not an arbitrary value chosen just because it is the common case.

> Wrong re-encoding of request parameter values
> ---------------------------------------------
>
>                 Key: SLING-1879
>                 URL: https://issues.apache.org/jira/browse/SLING-1879
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.1.0
>            Reporter: Davide Maestroni
>            Priority: Critical
>
> When the request character encoding is different from the sling servlet 
> default, i.e. ISO-8859-1, the request parameter values are wrongly re-encoded.
> In fact, in case the request encoding is UTF-8 and one of the parameter 
> values is "Orlèans", when ContainerRequestParameter.setEncoding() is called, 
> the value is first encoded into bytes using UTF-8 and then the same bytes are 
> passed to the new string with the ISO-8859-1 encoding. Thus what is 
> effectively done is: 
> this.value = new String("Orlèans".getBytes("UTF-8"), "ISO-8859-1")
> The resulting value is obviously wrong: "Orlèans".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to