On Mar 29, 8:33 am, hywang <why00...@163.com> wrote: > -------model file is like this --------------------- > db.define_table('options_contain_chinease', > Field('student_name', requires = IS_IN_SET(["Jim","小长","老李"], > multiple=True)),
Using this last string from your IS_IN_SET example (I hope my copy/ paste did this correctly into iPython!): In [31]: value=r"老李" In [32]: value Out[32]: '\xe8\x80\x81\xe6\x9d\x8e' In [33]: str(value) Out[33]: '\xe8\x80\x81\xe6\x9d\x8e' In [34]: re.compile(r"[\w\-:]+").findall(value) Out[34]: [] In [35]: re.compile(r"[\w\-:]+").findall(value, re.U) Out[35]: [] In [36]: re.compile(r"[\w\-:]+",re.U).findall(value) Out[36]: ['\xe8', '\xe6'] In [37]: re.compile(r"[\w\-:]+",re.U).findall(value,re.U) Out[37]: [] ---> So it would seem you may need to setup something with LOCALE; I have played around with this for just a little bit, but am not sure what it takes (zh-CN? zh-cn? zh_CN.gb2312? etc.) Maybe others can add to this... Regards, - Yarko > ) > db.options_contain_chinease.student_name.widget = > CheckboxesWidget.widget > > ------controller file is like this --------------------- > def options_contain_chinease(): > form = SQLFORM(db.options_contain_chinease) > if form.accepts(request.vars, session): > pass > return dict(form=form) > > if checked one item and submit, everything is ok, however, when > checked more than one items and submit the form, an error will occur . > Is it a bug ? > > thanks ! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.