[Twisted-web] Matt's "forms" - validation error when field name is not ASCII

Jean-Paul Calderone exarkun at divmod.com
Sat Dec 10 08:36:01 MST 2005

On Sat, 10 Dec 2005 17:11:32 +0200, Tristan Seligmann <mithrandi-twisted-web at mithrandi.za.net> wrote:
>* Paul Reznicek <maillists at ivsn.com> [2005-12-10 13:10:25 +0100]:
>> Current state (note the "ä" character (German 'ae' in name):
>>    form.addField('währung', forms.String(required=True))
>> You can fill some data in the form, but you permanently get the
>> "required" message for this field.
>> Attached patch open the possibility of using Unicode characters
>> in field names and corrects above error.
>The attached patch doesn't seem right at all, to me; if it does actually
>do the right thing, then it seems to me you should just be passing a
>unicode string in the first place. In other words:
>    form.addField(u'währung', forms.String(required=True))

And an appropriate encoding declaration at the top of the source file:

# coding: utf-8

Or if you like emacs,

# -*- coding: utf-8 -*-


More information about the Twisted-web mailing list