W3C home > Mailing lists > Public > www-international@w3.org > July to September 2003

Re: what should the charset be in the response to the server

From: Martin Duerst <duerst@w3.org>
Date: Thu, 07 Aug 2003 11:43:23 -0400
Message-Id: <>
To: Shigemichi Yazawa <yazawa@globalsight.com>, Jungshik Shin <jshin@i18nl10n.com>
Cc: <www-international@w3.org>

At 10:41 03/07/28 -0600, Shigemichi Yazawa wrote:

>I entered a Japanese text and got the same result. No content-type
>header.  Mozilla 1.4 (for Windows) doesn't put it either.
>I setup a JSP here. Feel free to try this out yourself.

Currently, that gives a 500 internal server error. Maybe you
already disabled it?

>I also setup another JSP that adds accept-charset="UTF-8" in FORM
>element as Chris suggested.

(same 500 here)

>It seems to work fine even if you change the character encoding in
>your browser. This seems to be a effective solution for immediate

I think it is a good idea to both say accept-charset="UTF-8" in
the FORM element AND make sure the page is sent out as UTF-8
(and check that the data is UTF-8 when it comes back).
The reason for this is that support for accept-charset on the
FORM element has picked up only recently; some fairly new
browsers may not honor it.

>Even using this technique, you still have to do this old trick.
>   new String(request.getParameter("param").getBytes("ISO8859_1"), "UTF-8");

didn't work last time I tried. Maybe I'll try again.

Regards,    Martin.
Received on Thursday, 7 August 2003 11:46:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:23 UTC