Re: form parameters

2009-03-20 Thread André Warnier
Joseph Millet wrote: Maybe I'm missing something but from the little knowledge I have, I'd think an HTML form is posted encoded in the form enclosing HTML document charset specified in the sent Server headers. So that you settle a page encoded in iso-8859-2, you wouldn't expect a form present in

Re: form parameters

2009-03-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joseph, On 3/19/2009 7:49 PM, Joseph Millet wrote: > Maybe I'm missing something but from the little knowledge I have, I'd > think an HTML form is posted encoded in the form enclosing HTML > document charset specified in the sent Server headers. It d

Re: form parameters

2009-03-19 Thread Joseph Millet
Maybe I'm missing something but from the little knowledge I have, I'd think an HTML form is posted encoded in the form enclosing HTML document charset specified in the sent Server headers. So that you settle a page encoded in iso-8859-2, you wouldn't expect a form present in that page to post unico

Re: form parameters

2009-03-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 3/17/2009 6:52 AM, Pid wrote: > Does the Servlet Spec define the default value of the request encoding, > or is this a Tomcat feature? The servlet spec (section 3.9 "Request data encoding") specifies ISO-8859-1 as the default encoding for POS

Re: form parameters

2009-03-17 Thread Pid
André Warnier wrote: > Christopher Schultz wrote: >> >> Quick question: multipart/form-data is typically used for file upload... >> why not use application/x-www-form-urlencoded instead? I realize the >> problem is that certain browsers do not send the proper charset in the >> Content-Type, but I'd

Re: form parameters

2009-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/16/2009 8:30 PM, André Warnier wrote: > Christopher Schultz wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> André, >> >> (Man, I need to get a keyboard mapping for "é". This copy-and-paste >> thing is such a drag...) > >

Re: form parameters

2009-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/16/2009 6:59 PM, André Warnier wrote: > The real fix would be HTTP 1.2, specifying once and for all that the > default encoding for query parameters is Unicode/UTF-8 Yes. Given that HTTP/1.1 clients should include Content-Type yet don't,

Re: form parameters

2009-03-16 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, (Man, I need to get a keyboard mapping for "é". This copy-and-paste thing is such a drag...) Well, you can use Andre, I don't mind and I'm used to all kinds of spellings. Or you can use André , the special form

Re: form parameters

2009-03-16 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/16/2009 11:53 AM, André Warnier wrote: As far as I understand the HTTP specs, something like request.setCharacterEncoding() should only be used (with a charset different from iso-8859-1) when a request comes i

Re: form parameters

2009-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, (Man, I need to get a keyboard mapping for "é". This copy-and-paste thing is such a drag...) On 3/16/2009 6:09 PM, André Warnier wrote: > Christopher Schultz wrote: >> >> Quick question: multipart/form-data is typically used for file upload...

Re: form parameters

2009-03-16 Thread André Warnier
Christopher Schultz wrote: Quick question: multipart/form-data is typically used for file upload... why not use application/x-www-form-urlencoded instead? I realize the problem is that certain browsers do not send the proper charset in the Content-Type, but I'd like to understand your affinity f

Re: form parameters

2009-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/16/2009 11:53 AM, André Warnier wrote: > As far as I understand the HTTP specs, something like > request.setCharacterEncoding() should only be used (with a charset > different from iso-8859-1) when a request comes in without a charset > sp

Re: form parameters

2009-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, FYI After logging, this seems to be one of the most-discussed topics on the list. On 3/16/2009 9:54 AM, André Warnier wrote: > I am about 99% sure of the following, but I would like to be 100% sure. To sum up: 1. Using to set the Content-Ty

Re: form parameters

2009-03-16 Thread Mark Thomas
Gregor Schneider wrote: > If found this one: > > http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset > > Actually, to me it's not clear why Tomcat should believe the input > being encoded in ISO8859-1, when one can give a detailled information > how the form-data is encoded. > >

Re: form parameters

2009-03-16 Thread André Warnier
Gregor Schneider wrote: If found this one: http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset Actually, to me it's not clear why Tomcat should believe the input being encoded in ISO8859-1, when one can give a detailled information how the form-data is encoded. If I understand

Re: form parameters

2009-03-16 Thread Gregor Schneider
If found this one: http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset Actually, to me it's not clear why Tomcat should believe the input being encoded in ISO8859-1, when one can give a detailled information how the form-data is encoded. If I understand it correctly, one can eve

Re: form parameters

2009-03-16 Thread André Warnier
Joseph Millet wrote: Thing is you've got an HTML form that you tell browsers it is ISO-8859-2, so when they post it to form target URL - it gets send encoded as ISO-8859-2, it is then your responsibility to parse incoming queries Sorry, but I think this is incorrect. According to the HTTP spec

Re: form parameters

2009-03-16 Thread André Warnier
Gregor Schneider wrote: On Mon, Mar 16, 2009 at 3:10 PM, Mikolaj Rydzewski wrote: It doesn't work for me. By default Tomcat uses ISO-8859-1 encoding. And it will try this encoding to parse input parameters. That's true, I'm doing the same here for German Umlaute, however: One link in the Wi

Re: form parameters

2009-03-16 Thread Joseph Millet
Thing is you've got an HTML form that you tell browsers it is ISO-8859-2, so when they post it to form target URL - it gets send encoded as ISO-8859-2, it is then your responsibility to parse incoming queries in the encoding you asked it to be encoded. Depending upon your requirements, UTF-8 will

Re: form parameters

2009-03-16 Thread Gregor Schneider
On Mon, Mar 16, 2009 at 3:10 PM, Mikolaj Rydzewski wrote: > > It doesn't work for me. By default Tomcat uses ISO-8859-1 encoding. And it > will try this encoding to parse input parameters. > That's true, I'm doing the same here for German Umlaute, however: One link in the Wiki is pointing to HTT

Re: form parameters

2009-03-16 Thread Mikolaj Rydzewski
André Warnier wrote: If, inside a html page containing a tag such as [...] would always return into p1, the proper internal Java Unicode string value of the input element "param1" of the form, properly decoded from it's original iso-8859-2 encoding. Yes ? Hi, It doesn't work for me. By

form parameters

2009-03-16 Thread André Warnier
Hi. I am about 99% sure of the following, but I would like to be 100% sure. Referring to HttpServletRequest.getParameter() HttpServletRequest.getParameterValues() If, inside a html page containing a tag such as there is a form section defined as follows : action="(url of my webapp/servlet)"