> What a servlet request really needs is a setCharacterEncoding()
> concept.
That sounds reasonable to me. We haven't made much progress though
because it only solves a portion of the problem. The open question has
been, should we bite off a little more and have a way to more easily
figure out what the charset should be? For example, use the session or
hidden form fields to keep track?
I suspect not.
Using the session doesn't appeal since it falsely assumes the client
would only use one charset -- I could easily see someone browsing a site
in two languages to compare results.
Using hidden form fields (as discussed in p. 390 of my book) is the
most reliable way, but considering how many ways there are to write the
<form> from a servlet/JSP I don't think we could have much
infrastructure to help there.
So it leaves us with nothing but a helper method, something that you
call once to simplify how getParameter() behaves. Well, it's better
than nothing. We should add it to the list of things to consider for
Servlets 2.3.
In fact, I could add a com.oreilly.servlet.ParameterParser
setCharacterEncoding() method so that this would work for older
versions of the Servlet API too. What do people think of that?
-jh-
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html