Re: [Zope-dev] z3c.form: Default form content type

2011-04-11 Thread Fred Drake
On Mon, Apr 11, 2011 at 8:02 AM, Sylvain Viollon  wrote:
>  Or if you have a descent schema system that include this information.

No, this really has to do with the widgets.  A widget may well use
Unicode data regardless of the expected result type.  And most
interesting schema leave a lot to be handled by widgets (think about
selections from database-hosted sources, where the form values may be
unicode but the selected values are objects).

Multipart forms make more sense as a default.


  -Fred

-- 
Fred L. Drake, Jr.    
"Give me the luxuries of life and I will willingly do without the necessities."
   --Frank Lloyd Wright
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] z3c.form: Default form content type

2011-04-11 Thread Sylvain Viollon

  Hello,

On Mon, 11 Apr 2011 10:38:34 +0200
Martijn Pieters  wrote:

> The majority of forms use Unicode widgets, so this falls under the
> heading of non-ASCII data. Also, it'd be almost impossible to
> auto-detect when binary data will be handled by the form, unless you
> start introspecting widget output, so the default looks entirely sane
> to me.
> 

  Or if you have a descent schema system that include this information.

  Regards,

  Sylvain,


-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] z3c.form: Default form content type

2011-04-11 Thread Martijn Pieters
On Sun, Apr 10, 2011 at 15:54, Markus Kemmerling
 wrote:
> By default z3c.form sets the form content type to 'multipart/form-data' (the 
> default value of IInputForm['enctype']). According to 
> http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 this MIME type 
> "should be used for submitting forms that contain files, non-ASCII data, and 
> binary data." Shouldn't the default value rather be set to the default 
> content type of HTML forms, i.e. 'application/x-www-form-urlencoded'?

The majority of forms use Unicode widgets, so this falls under the
heading of non-ASCII data. Also, it'd be almost impossible to
auto-detect when binary data will be handled by the form, unless you
start introspecting widget output, so the default looks entirely sane
to me.

-- 
Martijn Pieters
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] z3c.form: Default form content type

2011-04-10 Thread Markus Kemmerling
Hi,

By default z3c.form sets the form content type to 'multipart/form-data' (the 
default value of IInputForm['enctype']). According to 
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 this MIME type 
"should be used for submitting forms that contain files, non-ASCII data, and 
binary data." Shouldn't the default value rather be set to the default content 
type of HTML forms, i.e. 'application/x-www-form-urlencoded'?

Regards,
Markus Kemmerling
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )