thanks again, this was easier that I thought :) On Jan 21, 12:16 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > web2py assumes everything is utf8. You have to encode in utf8 before > passing the list of options to the set. > > Calling unicode instead of str would break the case when options are > helpers. > > On Jan 20, 5:06 pm, selecta <gr...@delarue-berlin.de> wrote: > > > > > in my application I use some unicode characters > > when i tried to add å to IS_IN_SET i got the following > > > Traceback (most recent call last): > > File "/home/select/Dev/web2py/gluon/restricted.py", line 173, in > > restricted > > exec ccode in environment > > File "/home/select/Dev/web2py/applications/movie/controllers/ > > default.py", line 479, in <module> > > File "/home/select/Dev/web2py/gluon/globals.py", line 96, in > > <lambda> > > self._caller = lambda f: f() > > File "/home/select/Dev/web2py/applications/movie/controllers/ > > default.py", line 232, in edit > > Field("language", requires=IS_IN_SET > > (Countries.domain2country.values())), > > File "/home/select/Dev/web2py/gluon/validators.py", line 246, in > > __init__ > > self.theset = [str(item) for item in theset] > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf5' in > > position 1: ordinal not in range(128) > > > I am not sure if this works for all cases but i guess str(item) could > > be changed to unicode(item) to fix this problem
-- 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.