Documentation for Confluence 4.1.x. Documentation for earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when Confluence's encoding is UTF-8, and you are using international characters in attachment or page names.

  1. Edit conf/server.xml and find the line where the Coyote HTTP Connector is defined. It will look something like this, possibly with more parameters:
  2. Add a URIEncoding="UTF-8" property to the connector:
  3. Restart Tomcat

If you are using mod_jk

You should apply the same URIEncoding parameter as above to the AJP connector if you are using mod_jk, and add the following option to your Apache mod_jk configuration:

More information using Apache with Tomcat

For comprehensive examples of how to use Tomcat and Apache with Confluence, see Running Confluence behind Apache.

  1. Jun 15, 2007

    One of these goes in Tomcat's config, the other in Apache's. 

    This line <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>goes in <tomcat>/conf/server.xml

    This line:JkOptions +ForwardURICompatUnparsed
    goes in  <apache>/conf/httpd.conf
     (or <apache>/conf/httpd.include if you use an include file. It can go inside the <VirtualHost> element.

    1. Nov 03, 2010

      This line:JkOptions +ForwardURICompatUnparsed
      goes in <apache>/conf/httpd.conf

      Should I just put the line at the end of httpd.conf?

      And if I use Apache AND mod_jk. I need to add BOTH of these?

      <Connector port="8080" URIEncoding="UTF-8"/>

      <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>

  2. Jul 13, 2007

    hint to JBoss admins

    This is also necessary if you are running *JBoss* with tomcat inside.
    If you have problems with attachments' file names containing umlauts or special characters like döner.jpg this will be the right way.

    Inside JBoss you'll find the tomcat server.xml here: 

    <jboss home>/server/default/deploy/jbossweb-tomcat55.sar/server.xml 

    Example for the configuration for port 8080: 

     

  3. Nov 26, 2007

    Anonymous

    The URIEncoding attribute didn't appear to do anything for me, however, ensuring the HttpServletRequest's character encoding was set to "UTF-8"BEFORE, and this is key, trying to read any parameters from the request did work.

    This was in a sandbox test of posting a form directly to a servlet URI, however my next step is getting it to work in Struts on a Tomcat instance running behind an Apache server where that attribute may be necessary.

    --adam 

  4. Apr 13, 2010

    Anonymous

    As I use the evaluation version of Confluence3.2, I can't find the <apache>/conf/server.xml as previous versions,

    , In this case how can I set the URIEncoding to insure the search function of Chinese language.

    1. Apr 14, 2010

      Hi there,

      Unfortunately, yes in the One-Click Confluence instance, you do not the option to edit the server.xml as it is meant for evaluation purposes.

      What I would suggest you to do here is to download Confluence Standalone for Production Usage if you would like to have the option of setting the parameter URIEncoding="UTF-8" in your server.xml file.

      Regards.

  5. Jan 07, 2011

    Without this setting you will suffer at least some issues with the file attachments including accents or special characters such as:

    • cannot remove the file
    • cannot view the file (PDF and office document, link on the right)
    • cannot edit in office (office document only)
    • cannot access to the properties to rename and other action.

    Each time you get some kind of error.

    If you don't work in plain English using French, German or any other one and even if you work in English TURN ON this flag.

    1. Nov 22, 2011

      I migrate an instance in Linux Server to Windows server 2008, and attachments were mangled, because of the accent in the same. For example: 

      The original name of Attachments is: 11179_TESTE DE APLICAÇÃO CULINÁRIA.doc

       The name in Windows server is: 11179_TESTE DE APLICA%3F%3FO CULIN%3FRIA.doc

       The name in Linux server is: 11179_TESTE DE APLICA??O CULIN?RIA.doc

       

      I'm using the portuguese language, have any problem with that?


  6. Feb 06, 2011

    I have Apache2 Web Server in front of Confluence 3.4.7 and had an issue renaming/deleting an attachment with special characters (opening and closing quotes).

    Mlodifying server.xml with <Connector port="8080" URIEncoding="UTF-8"/> worked for me.

    I did not have to go any further. My comment is why the additional "JkOptions +ForwardURICompatUnparsed" step? According to the Official Tomcat Connector Docs,

    "Using JkOptions ForwardURICompatUnparsed, the forwarded URI will be unparsed. It's spec compliant and secure. It will always forward the original request URI, so rewriting URIs with mod_rewrite and then forwarding the rewritten URI will not work.?

    To me this would appear to reduce the flexibility of your system because mod_rewrite is so darn useful.

  7. Feb 06, 2011

    To clarify for newbies I suggest editing the page to include restart steps, server.xml requires the applications server running confluence to be restarted and the JkOptions change requires a Web Server restart (maybe a reload would work too, but I never tested it).

  8. Apr 12, 2011

    As of today and Confluence 3.5.1 the Connector statement ALREADY INCLUDES

    URIEncoding="UTF-8"

    That no modification for UTF-8 is necessary by default should be stated in the first paragraph. http://confluence.atlassian.com/display/DOC/Database+Setup+for+SQL+Server states to check: for speed it could say UTF-8 is default for Tomcat bundled with Confluence even though its not default for Tomcat as shipped by Apache.

    Martin.

  9. Sep 29, 2011

    Anonymous

    Thanks a lot (smile)