Re: formencode and toscawidgetsforms interaction
Alberto Valverde <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
On Jan 9, 2007, at 9:07 AM, David Smith wrote: > Hi all, > > I was experimenting with using ToscaWidgetsForms and tried > using a UnicodeString field in a ListForm which proceeded to > die with a Unicode decode error. I traced this to formencode's > UnicodeString validator automatically encoding the unicode > object into utf-8 which genshi then tried to use in a > u''.join([value]) form, which causes the error. > > Thus, you cannot currently use non-ascii strings with > ToscaWidgetsForms fields. > > I've attached a patch to toscawidgetform's test_forms.py to > demonstrate. > > I believe the solution is that UnicodeString's from_python > should not encode the string. Would that cause a problem for > anyone? I've just comitted the tests you provided to TW (thanks!) and they all pass. I'm using FE 0.6 so I guess it's fixed in FE already, what version of FE are you using? Just in case I've bumpled TW's requirement to FE 0.6. Alberto ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV