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.


Reply via email to