-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nch,

nch wrote:
| But, if the URL is allways encoded in the same way and tomcat does
| not receive any other information on what the resulting character
| encoding should be. Why do I get different values from tomcat?

Because the servers are configured differently (probably is some very
small way). The problem is that the HTTP spec is ... hazy when it comes
to how URIs should be interpreted. The spec says that "most servers
expect ISO-8859-1", but many clients are (rightfully so, IMO) switching
to UTF-8. This leaves us developers in a limbo where we have to beat our
servers into submission and cross our fingers when decoding URIs.

| | Tomcat does not use any environment variables. The only settings that
| | affect the interpretation of the URI are the "URIEncoding" and
| | "useBody..." settings on the <Connector>. Are you using more than one
| | connector? Are you using Apache httpd out in front of Tomcat?
|
| Ah, I forgot to mention. I do have an apache httpd in front of
| tomcat, but for testing purposes I'm directly accessing tomcat through
port
| 8080. Anyway, it yields same results whether directly accessing tomcat
| or through httpd.

If you have multiple <Connector>s (one for AJP and one for HTTP), are
you setting the URIEncoding="utf-8" on both of them, or only one of
them? It would help if you posted your entire server.xml.

| So, if tomcat doesn't read env. variables, why would debian packagers
| try to set LANG to system default into their tomcat init script?

Probably to make it more consistent with the rest of the packages they
support. They want you to be able to set LANG=foo and have it change
everything for all services.

| Does that make sense?

I think it /does/ make sense, but it often confuses the issue when
you're dealing with someone who is NOT using, say, debian.

Note that there are no external factors for URI decoding. The only
setting that can change it is the URIEncoding attribute of the
<Connector>. It does not fall-back to the system Locale's preferred
encoding or "file.encoding" or anything weird like that. It /always/
falls-back to ISO-8859-1, regardless of any other settings.

| BTW, the instance of tomcat I'm running on debian was manually
| downloaded from tomcat.apache.org

The only reason it would be an issue is if the configuration was not
what you expected it to be (for instance, the server.xml you are editing
is not the one that TC is actually using).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhZeP8ACgkQ9CaO5/Lv0PA3ngCeMSw/ltgABrIKpVsqb+HEqAa9
KP0Aniac1roIDr0rPBl098vfGxlnVf7p
=RGzQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to