---------- Forwarded message ---------- From: Christopher Schultz <[EMAIL PROTECTED]> To: Tomcat Users List <users@tomcat.apache.org> Date: Mon, 19 Mar 2007 12:55:30 -0400 Subject: Re: Requesting files with non-English/international characters in their names -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Chris, Thanks for your reply. My comments are below:
Thomas, Thomas Peter Berntsen wrote: > I have some trouble getting Tomcat to return files with > non-English/international characters in their names. It's interesting how questions like this come in waves. > I have tried setting 'URIEncoding="UTF-8"' in the port 8080 connector, > but without success. Are you serving your pages in UTF-8 encoding? Usually, the browser uses the response encoding from the previous request to submit the next request's URI. If you are using ISO-8859-1 for your web pages, then expecting the browser to use UTF-8 for the URIs in incorrect.
Thanks. I'll check that. But isn't that irrelevant in the case that I just request a directory listing through a URL like: "localhost:8080/test"? Or irrelevant in the case I request a file directly through a URL like: "localhost:8080/æøå.gif"? I mean, it's not that I access a webapp's jsp file first through the browser. Or do I need to look for Tomcat's own jsp files (used to provide the view for the directory listing) and edit those to use UTF-8? Just to be sure I edited the index.jsp of the ROOT app in which I have created the "æøå.gif" file and changed the encoding to UTF-8, but with no different result.
Basically, you have to make sure that everything is using UTF-8, and it should all start to work. If you are missing one piece of the puzzle, you can always find something that doesn't work. Check: - - Your web page response encoding. - - Any forms with overridden encoding. - - Your <Connector> (which you already mentioned). ... and make sure that everything is using UTF-8. Next, verify that it is set up properly by requesting a page and then examining the request using your browser. I believe that most popular browsers today will display the character encoding being used to render the page if you view the "page properties" or whatever the proper term is in your browser. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF/sCC9CaO5/Lv0PARAtXUAJ9J8Osxwy8dgcKg5jUwO0w61njD7gCcCi6t BQ52LhpMAT2lS68smdnbPlQ= =E1Wy -----END PGP SIGNATURE-----
Thanks for your help until now. Cheers, Thomas --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]