- From: Martin Duerst <duerst@w3.org>
- Date: Thu, 07 Aug 2003 11:43:23 -0400
- 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.
>
>http://www.runout.org/html-form-test/multi-part-form.jsp
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.
>
>http://www.runout.org/html-form-test/accept-charset.jsp
(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
>needs.
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");
Using
request.setCharacterEncoding("UTF-8");
request.getParameter("param");
didn't work last time I tried. Maybe I'll try again.
Regards, Martin.
Received on Thursday, 7 August 2003 11:46:50 UTC