you can create a filter that does response.setContentType("UTF-8") or
whatever encoding you need
filip
Ramez Ghazzaoui wrote:
Hi,
I have exposed a specific Windows file system folder on my Tomcat HTTP
5.5.9 server box's local hard drive so I can access files in that
folder remotely. For simplicity, let us say I've inserted the
following Context in my server.xml:
<Context path="/music" docBase="c:\my_cds\music\"
trusted="false" crossContext="true" debug="1"
reloadable="true">
</Context>
When I use IE to browse to that URL, the Directory Listing (produced
by Tomcat) displays properly. I can click on any file listed, and if
the file's name is all in English characters then it downloads
properly to the client machine.
However, if I click on a file that contains foreign characters, such
as the ç in filename "Claude François - Quelquefois.mp3", the link
does not function. Specifically, the link produced by Tomcat is:
http://foobar.org/music/Claude%20Fran%C3%A7ois%20-%20Quelquefois.mp3
but unfortunately clicking on it produces a 404 error.
The problem in this example is surely with the %C3%A7 which is a
substitute for 'ç' because if I rename the file on disk to say
Francois (with a plain 'c') and refresh the page in IE, it becomes
accessible.
Note: With the file name containing the word "François", even if I
manually edit the URL in the address bar and replace the %C3%A7 with ç
it still doesn't work.
How can I make Tomcat properly handle such file names? -- OR -- Is
this a bug in Tomcat?
Thanks.
-Ramez
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Filip Hanik
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]