[ 
https://issues.apache.org/jira/browse/SLING-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602763#action_12602763
 ] 

Tobias Bocanegra commented on SLING-508:
----------------------------------------

iiuc, this is (currently) mainly a servlet container problem. i.e. when running 
inside jetty, we can assume that the parameters are decoded with utf-8, if 
running inside tomcat, we can assume that parameters are decoded with 
iso-8859-1. or whatever is configured in the container (e.g. websphere has 
configuration for this).
browsers usually send in the page encoding, so this can be controlled by the 
script (with the only exception that the user can switch the page encoding 
manually before submitting the form).

i suggest to make the SERVLET_CONTAINER_DEFAULT_ENCODING configurable, try to 
force the container to use that decoding, and reencode with the _charset_ 
encoding if needed.

in the simplest case, setting SERVLET_CONTAINER_DEFAULT_ENCODING to utf-8 
inside jetty, and to iso-8859-1 inside tomcat (which i would use as the 
default).

> Parameter decoding uses wrong default charset
> ---------------------------------------------
>
>                 Key: SLING-508
>                 URL: https://issues.apache.org/jira/browse/SLING-508
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>            Priority: Blocker
>
> As of SLING-152 the request paremeters are re-encoded if a _charset_ 
> parameter is present. it assumes that the default encoding is
> UTF-8 which is not the case for servlet spec compliant containers (eg. 
> tomcat).
> change the default encoding to ISO-8851-1 or make it configurable.
> see: 
> http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/parameters/Util.java?view=markup

-- 
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