On Sep 24, 2009, at 10:59 AM, Jeff Schnitzer wrote: > I wrote up a quick blurb on the issues surrounding character encoding > on the Resteasy list recently: > > http://sourceforge.net/mailarchive/message.php?msg_name=540eb7210908281001r6aafaa55u78615debb704e4c1%40mail.gmail.com > > The short of it is that, if you can get away with it, you should set > UTF-8 everywhere. In particular, you should set the platform default > with -Dfile.encoding=utf-8 and ensure that all your pages are rendered > in utf-8 (ie with the JSP directive). It's cool that Resin has a > config parameter for this, but it will be obviated by setting the > platform default - right, Scott?
Hmm. Yes, it should, but actually I need to check that. Resin's command-line tests are a different section of the test suite (because it launches an external Resin) and I'm not sure we have coverage. I've filed a bug to make sure it's not forgotten. Resin might just be defaulting to utf-8. Because of the Servlet/JSP TCK, we have a bit of a problem because the TCK requires all the defaults to be ISO-8859-1, but we want the default to be file.encoding or UTF-8. -- Scott > > > The main problem is that POSTed form data will be sent by the browser > in whatever charset encoding was used on the host page, and this > information is not sent along with the request. So the server must > guess... and that usually means going with the platform default. > > If you for some reason need to manage multiple charsets in the same > application, you'll need a Filter that executes early and calls > request.setCharacterEncoding() *before* any code calls > request.getParameter(). > > Jeff > > > _______________________________________________ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest _______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest