Hey there,
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 On
RewriteRule ^(.*)$ 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/Ümläüt–Test (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/Ümläüt–Test.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).
Strangely, we’ve got another server running Confluence 3.2.1_01, and there everything works.
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!