Simply putted I can't download files that are hosted in my web server if they have special characters in the filename because I get 404.
If I create a file called olá.txt I don't seem to find the correct URL to download it. I've tried all possible ways to download it:
mydomain.com/olá.txt
mydomain.com/ol%C3%A1.txt
and I always get a 404 from Apache Tomcat 7.0.3, but if I change the file name to ola.txt everything is fine.
I've added AddDefaultCharset utf-8
to the httpd.conf but I still have the issue.
I mean it should be possible to download files with names containing non ascii characters, right?
Update: My server.xml
has:
<Connector URIEncoding="UTF-8" compressableMimeType="text/javascript,text/css"
compression="on" compressionMinSize="2048" connectionTimeout="20000"
noCompressionUserAgents="gozilla, travista" port="8080"
protocol="HTTP/1.1" redirectPort="8443"/>
Update:
echo -n olá | od -An -tx1 = 6f 6c c3 a1
echo $LANG = en_US.UTF-8
locale:
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=