According to Tomcat FAQ, for handling HTTP requests by default Tomcat uses the ISO-8859-1 encoding.
Starting with version 5 for all GET
requests, when the encoding type different from the default is used, the query parameters are not encoded in the same way as the request body. To be more specific, if you want to use the encoding other than the default ISO-8859-1 (like UTF-8, for example), the HttpServletRequest.setCharacterEncoding("UTF-8")
method will only be applied to the request body, and not the URI.
In order to encode the query parameters just like the requests, you should use the URIEncoding="UTF-8"
attribute in the Connector
element of the Server.xml
file.
CKFinder uses the UTF-8 encoding, so you should stick to the guidelines presented above in order to make it work properly.
If you cannot or do not want to set this parameter in the server configuration file, CKFinder will try to address this problem for you. This is why the uriEncoding
configuration element was created in the config.xml
file. This parameter accepts the encoding of your query parameters. For GlassFish, Jetty, Tomcat, and JBoss with URIEncoding
set to UTF-8 you should set uriEncoding
to UTF-8 as well.
For Tomcat and JBoss without the URIEncoding="UTF-8"
set you should configure uriEncoding
to ISO-8859-1 and CKFinder will convert the query parameters for you.