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.
- Edit
conf/server.xmland find the line where theCoyote HTTP Connectoris defined. It will look something like this, possibly with more parameters: - Add a
URIEncoding="UTF-8"property to the connector: - 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.








12 Comments
Hide/Show CommentsJun 15, 2007
Michael Bushe
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.
Nov 03, 2010
Royce Wong
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?
Jul 13, 2007
Stefan Baader
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:
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
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.
Apr 14, 2010
Joachim Ooi [Atlassian]
Hi there,
Unfortunately, yes in the One-Click Confluence instance, you do not the option to edit the
server.xmlas 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.xmlfile.Regards.
Jan 07, 2011
Olivier DUPUY
Without this setting you will suffer at least some issues with the file attachments including accents or special characters such as:
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.
Nov 22, 2011
Fernando Horn
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?
Feb 06, 2011
Tin Pham
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.
Feb 06, 2011
Tin Pham
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).
Apr 12, 2011
Martin Cleaver [blended perspectives]
As of today and Confluence 3.5.1 the Connector statement ALREADY INCLUDES
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.
Sep 29, 2011
Anonymous
Thanks a lot
Add Comment