From f030ac3a55eca874552758a94b3fb99ae129a412 Mon Sep 17 00:00:00 2001 From: Mayoro Diagne <mayoro@nexedi.com> Date: Tue, 29 Jun 2010 13:10:58 +0000 Subject: [PATCH] use utf-8 encoding for unicode expressions git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36692 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/ScribusParser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/product/ERP5Form/ScribusParser.py b/product/ERP5Form/ScribusParser.py index 1806aa5c2a..6d1f298c76 100644 --- a/product/ERP5Form/ScribusParser.py +++ b/product/ERP5Form/ScribusParser.py @@ -30,7 +30,7 @@ ############################################################################## from AccessControl import ClassSecurityInfo from lxml import etree - +from zLOG import LOG,INFO class ScribusParser: """ Scribus parser API provide methods wich allow to parse a scribus file. @@ -478,7 +478,11 @@ class ScribusParser: for attributes in field[1]["ANTOOLTIP"].split("#"): if attributes != "": key,value = attributes.split(":") + if isinstance(key, unicode): + key = key.encode('utf-8') + if isinstance(value, unicode): + value = value.encode('utf-8') if key == "nb": - value = int(value) - erp5_attribute_dict[key]=value + value = int(value) + erp5_attribute_dict[key]=value return erp5_attribute_dict -- 2.30.9