[OGo-Developer] multipart/form-data and text encoding

Stéphane Corthésy developer@opengroupware.org
Thu, 23 Aug 2007 21:26:10 +0200


On Aug 23, 2007, at 8:27 PM, Wolfgang Sourdeau wrote:

> On 2007-08-23 12:04:57 -0500 Stéphane Corthésy <stephane@sente.ch> =
 
> wrote:
>
>> Hi,
>>
>> I think I had the same kind of problem with WebObjects, and solved  =

>> it  by
>> setting the 'accept-charset' attribute on the form element: this   
>> tells the
>> client to use the passed charset, not a 'random' (server's  POV) one.
>>
>> Stéphane
>
> I have already tried that and it didn't change anything. I think  
> this field is only meant for the client to understand which kind of  =

> encoding it can use.
>
>> From http://www.w3.org/TR/html401/interact/forms.html#adef-accept- =

>> charset:
>
> "accept-charset = charset list [CI]
>     This attribute specifies the list of character encodings for  
> input data that is accepted by the server processing this form. The  =

> value is a space- and/or comma-delimited list of charset values.  
> The client must interpret this list as an exclusive-or list, i.e.,  
> the server is able to accept any single character encoding per  
> entity received.
>
>     The default value for this attribute is the reserved string  
> "UNKNOWN". User agents may interpret this value as the character  
> encoding that was used to transmit the document containing this  
> FORM element."
>
> I don't know it it is even useful...


As I understand it, if my form has accept-charset="utf-8", then the  
client has to return form data encoded in UTF-8 - not ISOLatin1, nor  
any other encoding. Thus, on the server-side, you can safely decode  
form data from UTF-8. Isn't it what's happening?

Stéphane



> Wolfgang
>
>
> --
> OpenGroupware.org Developer
> developer@opengroupware.org
> http://mail.opengroupware.org/mailman/listinfo/developer