How do I change Apache's URL encoding from ISO8859 to UTF-8?
I need to have some files whose names contain accented characters.
For example, ò.txt
In other servers, I transfer the file with FTP, and everything works.
I type in the browser the URL:
The browser automatically encodes the URL to UTF-8
Apache receives the GET request
GET /%C3%B2.txt HTTP/1.1
and decodes it, correctly returning the file "ò.txt"
On some servers (running WHM + Cpanel, btw) this fails, and apache uncorrectly searches for a funnily-named file. In the erro log, I see
File does not exist: /home/example/public_html/\xc3\xb2.txt
I have seen that requesting the same file manually entering an URL like this works:
(i.e. apache recevies a "GET /%f2.txt" request and serves the "ò.txt" file)
I appears that on this server the URLs are decoded using ISO8859-1 instead of using UTF-8, as it happens on other servers.
Where do I change this setting?
If I get it correctly, AddDefaultCharset (which btw I have tried) does not do this, as it changes the default charset for the response, not the request!