URI Encoding

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

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 used is different from the default one, 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.

By default, CKFinder uses the UTF-8 encoding, so you should stick to the guidelines presented above in order to make it work properly.

<uriEncoding>UTF-8</uriEncoding>

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.

<uriEncoding>ISO-8859-1</uriEncoding>
important note
In CKFinder for Java BETA only, when URIEncoding is not set to UTF-8, some problems with viewing images placed in directories containing characters other than Latin may occur. The CKFinder development team is currently working on a solution to this problem.