Vyacheslav Pedak wrote:

> > What's your response to Costin's reasoning for closing the bug?
>
> I e-mail him that this problem really exists.

I was hoping for something more compelling.  Maybe an answer to his
question about the e' character?

> > And, more importantly, how would you have the server know how to
> > properly decode the bytes of the query string in the appropriate
> > charset?
>
> I understand that in many cases it can not be done by web server,

Exactly.  That's why you haven't seen a fix appear right quick.  :-)

> but if it
> will be a way to developer to specify which encoding to use for
> converting in this web application it may help (in intranet for
> example).

There is, as explained in Chapter 12 of Java Servlet Programming.
You just convert the String to bytes and then back to a properly
constructed String.  It's a bit awkward, but works just fine.

> After this choice web server can know what encoding to use
> to this client even if web browser does not specify
> anything in Content-Type header.

Sort of a "here's the decoding method I want" flag.  I'm not sure you're
going to see that added to the servlet spec since the pertinent RFCs
just don't make enough guarantees that things like that will always
work.  But you can of course build a little infrastructure to do it
yourself.  I showed in the book how to use a hidden charset value.
That's been a commonly accepted way to deal with this problem.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html

___________________________________________________________________________
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

Reply via email to