-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
On 3/18/2009 11:15 AM, André Warnier wrote: > So, with Japanese characters in HTTP headers, you are outside of the > HTTP specification, and you cannot expect any webserver (or proxy) to > handle this in any consistent manner. > > HTTP headers can specify the type and character set of the HTTP message > /body/, but there exists to my knowledge no mechanism to specify the > character set of a HTTP header. While this is correct, there's a somewhat obvious way to encode your headers (including Japanese or other non-ASCII characters) so they will work: java.net.URLEncoder.encode(text, "ASCII") You'll get a string like "foobar%45%67%65%43%45%45%78%69...". You just have to remember to decode the string on the other end in a similar way (java.net.URLDecoder). That should do it, though I would recommend using a POST body with a properly-set Content-Type (including encoding!) for sending data that isn't going to be ASCII-only. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknBHb0ACgkQ9CaO5/Lv0PD10ACgjfpjy2S8iXmTyKLQaWowKTAH eAcAn2ieCHyhRYMztzkYlPMuqoSxahnG =cjuG -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org