From a7e6e26d7b87150ea4c76f57e16f8c0595091c38 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Mon, 28 Jan 2013 13:25:21 +0100 Subject: [PATCH] fix possible UnicodeEncodeError in ZopeFind. --- product/Formulator/Field.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product/Formulator/Field.py b/product/Formulator/Field.py index d554b97bb2..f9dc8fa77d 100644 --- a/product/Formulator/Field.py +++ b/product/Formulator/Field.py @@ -449,6 +449,8 @@ class Field: return obj.method_name elif obj_type is TALESField.TALESMethod: return obj._text + elif obj_type is unicode: + return obj.encode('utf-8') return str(obj) return ''.join(map(getSearchSource, (self.values.values()+self.tales.values()+ -- 2.30.9