How to make attachments with international file names work?

we are running Confluence 3.5 standalone on an Ubuntu server. Apache forwards all requests on Port 80 to Confluence using mod_proxy_ajp, configured in an .htaccess file:

RewriteEngine OnRewriteRule ^(.*)$ ajp://127.0.0.1:8009/$1 [P]

Tomcat is correctly configured with URIEncoding="UTF-8" and the Postgres database also uses UTF-8.

Now I created a test page with the title “Ümläüt–Test” and attach a file “Ümläüt–Test.txt” to it. This is what happens:

When I click a link to the page, I land on the page http://wiki/pages/viewpage.action?pageId=16875630, as Confluence does not seem to put the page title in the URL when it contains special characters. The page is displayed correctly.

When I manually enter the URL as http://wiki/display/ds/%C3%9Cml%C3%A4%C3%BCt%E2%80%93Test (which the browser displays as http://wiki/display/ds/Ümläüt–Test), the page is also displayed correctly.

The attachment filename is displayed correctly in the attachment list.

When I click the attachment, I land on the URL http://wiki/download/attachments/16875630/%C3%9Cml%C3%A4%C3%BCt%E2%80%93Test.txt (displayed by the browser as http://wiki/download/attachments/16875630/Ümläüt–Test.txt). I receive an error “Page not found”.

When I access an attachment without special characters in the name, everything works correctly.

Inside the database, both the page names and the attachment names are displayed correctly.

The Confluence encoding test also does not report any errors.

This does not make any sense to me, as the URL encoding seems to be correct (else it wouldn’t be possitble to access the page).

When I run a local Confluence 3.5 installation (using atlas-debug), everything behaves the same, except that point 2 instead of point 4 gives me the “Page not found” error, so in that case, passing the attachment name in the URL works but passing the page name doesn’t. Adding URIEncoding="UTF-8" to the server.xml does not change that (although I’m not quite sure if atlas-debug actually uses the settings from that file).

All issues I can find that are related to this seem to be about Confluence 2. Is this a bug introduced in Confluence 3.5 or did I do anything wrong?

Cheers,Candid

Update:

I found out something new: I uploaded a file called “ä.txt”. When I clicked on the link inside Confluence, the file name was correctly encoded as “%c3%a4.txt” in the URL. When I accessed it using “%e4.txt” (the ISO-8859-1 representation), the attachment successfully opened!

In the conf/server.xml, in the <Connector> element do you have URIEncoding="UTF-8" ? This is on by default for the 8080 connector but probably not for the Ajp one. You could try it... I would have thought the ajp protocol handled this but worth a try.

Also, for the working confluence instance, is that configured to store attachments in the database or on the filesystem? Same question for the failing one...

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...