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: Shigemichi Yazawa <yazawa@globalsight.com>
Date: Mon, 28 Jul 2003 15:13:25 -0600
Message-ID: <5eu196e4ne.wl@flatiron.globalsight.com>
To: "Chris Haynes" <chris@harvington.org.uk>
Cc: <www-international@w3.org>

At Mon, 28 Jul 2003 19:19:16 +0100,
Chris Haynes wrote:
> 
> Your Servlet container should implement the Sun Servlet Spec.(Version
> 2.3, section 4.9), which says that if you call
>      request.setCharacterEncoding(String)
>  before accessing any of the parameters, the specified encoding is
> used in decoding the requests' parameters.
> 
> So you can just call
> 
>     request.setCharacterEncoding("UTF-8");
>     request.getParameter("param");

Thanks for the suggestion, Chris. I changed my code as above and it
works fine.

-------------------
Shigemichi Yazawa
yazawa@globalsight.com
Received on Monday, 28 July 2003 17:14:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:00 GMT