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). I did not check if the form data relates to the page
> encoding or something else. Bur if I recall correctly, only <form
> method="post" enctype="multipart/form-data"> (the php killer :-) has space
> for explicitly specifying an encoding somewhere. Unfortunately I know of no
> way to get at this data through Apache::Request - headers are only
> accessible for file uploads. Ultimately, the evaluation and conversion
> should be done
> transparently by that module, but it doesn't yet.

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

"multipart/form-data" simply allows you to encapsulate many mime entities in 
one post, so naturally each one can have a seperate encoding (and mime type). 
You can also provide any arbitrary HTTP headers to associate with each piece.

User agents of course aren't really so flexible normally. I would expect all 
browsers would probably POST in the preferred encoding of the user, so if you 
are in Netscape using ISO-8859-15, then thats what the server is going to see 
your form post in. I haven't tested this, but I believe that no encoding at 
all can be specified with a file upload. Maybe there is a javascripty way to 
do that, I don't recall one. 

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

>
> This disclaimer applies to my elaborations as well.

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

Reply via email to