From 2a245d36f4e4d43d7b2251d73811497239b21a51 Mon Sep 17 00:00:00 2001 From: Nik Klever Date: Sat, 5 Sep 2015 14:38:32 +0200 Subject: [PATCH] If in any of the form fields are unicode strings entered as input, the unicode characters in these strings are lost in self.vars. This conditions sets it back to the original input. Might be, that this should be done at another place, but it works. --- gluon/sqlhtml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 49fe24c4..ba7bf702 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -1668,6 +1668,9 @@ class SQLFORM(FORM): elif field.type == 'double': if value is not None: fields[fieldname] = safe_float(value) + elif field.type in ('string', 'text'): + if fieldname in self.request_vars: + fields[fieldname] = self.request_vars[fieldname] for fieldname in self.vars: if fieldname != 'id' and fieldname in self.table.fields\