Patch to display unicode list items correctly
--- Formulator/Field.py.orig 2004-04-26 23:36:41.000000000 +0800
+++ Formulator/Field.py 2004-05-18 14:58:42.000000000 +0800
@@ -394,6 +394,16 @@
if type(value) == type(''):
# in unicode mode, Formulator UI always uses UTF-8
value = unicode(value, 'UTF-8')
+ elif type(value) == type([]):
+ new_values = []
+ for valueitem in value:
+ if type(valueitem) == type(''):
+ valueitem = unicode(valueitem, 'UTF-8')
+ elif type(valueitem) == type(()):
+ valueitem = (unicode(valueitem[0], 'UTF-8'),
+ unicode(valueitem[1], 'UTF-8'))
+ new_values.append(valueitem)
+ value = new_values
new_result[key] = value
result = new_result
+++ Formulator/Field.py 2004-05-18 14:58:42.000000000 +0800
@@ -394,6 +394,16 @@
if type(value) == type(''):
# in unicode mode, Formulator UI always uses UTF-8
value = unicode(value, 'UTF-8')
+ elif type(value) == type([]):
+ new_values = []
+ for valueitem in value:
+ if type(valueitem) == type(''):
+ valueitem = unicode(valueitem, 'UTF-8')
+ elif type(valueitem) == type(()):
+ valueitem = (unicode(valueitem[0], 'UTF-8'),
+ unicode(valueitem[1], 'UTF-8'))
+ new_values.append(valueitem)
+ value = new_values
new_result[key] = value
result = new_result