On Friday 01 March 2002 16:33, Tod Harter wrote:
> On Thursday 28 February 2002 21:31, J�rg Walter wrote:
> > Form params are unfortunately returned in something else. I have not read
> > the relevant RFCs, but quick test showed to me that even mozilla, reknown
> > for its standards conformance, returns form data in a local charset
> > (iso-8859-15 for me). 
>
> Uh, not really true JW. HTTP spec allows for the Content-type: header of a
> "POST" to include the same encoding specifiers that a server can generate
> in a response. I don't think there IS a standard for what encoding to use
> in an upload simply for that reason, the body of a POST is in whatever
> encoding the user agent says it is...

>From http://www.w3.org/TR/html4/interact/forms.html#form-content-type :

----
application/x-www-form-urlencoded  

This is the default content type. Forms submitted with this content type must 
be encoded as follows:

   1. Control names and values are escaped. Space characters are replaced by 
`+', and then reserved characters are escaped as described in [RFC1738], 
section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent 
sign and two hexadecimal digits representing the ASCII code of the character. 
Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A').
---

J�rg is right, application/x-www-form-urlencoded is completely b0rkn re i18n. 
There isn't much that browsers can do about it. One can add an accept-charset 
list of accepted charsets, and when using multipart/form-data the browser 
must provide the charset flag to any text/* entity. I'm not sure that this 
works however, I intend to test it one of these days.

> The upshot is, your application should be prepared to accept arbitrary
> encodings on form input!

Except that this is not possible, at least not if you intend to do anything 
meaningful with the data.

-- 
_______________________________________________________________________
Robin Berjon <[EMAIL PROTECTED]> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
Always remember you're unique just like everyone else. 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to