> 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:

The point is that to conform to proper MIME typing an encoding should be 
specified by the HTTP user agent. So It should send back

Content-Type: application/x-www-form-urlencoded; charset=EUC-JP

for instance. Though actually I believe that if you look up the reference on 
URL encoding that it ALREADY specifies US-ASCII. Anything else technically 
should be escaped. So, basically you have it there in a nutshell. There 
should be no problems with unknown encodings, at least in theory...

>
>    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.

Well, lots of HTTP is "b0rkn" ;o). 
>
> > 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.

That might be overstating it a bit. As long as you don't have to convert it 
to any other charset you can still use the information. Honestly I wonder how 
big a problem this is for most applications. I cannot recall having serious 
problems with accepting fairly simple form input wrt encodings.

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

Reply via email to