diff --git a/product/ERP5Type/patches/ppml.py b/product/ERP5Type/patches/ppml.py index 92a1b79debb7d38240ce95f24553511b7614667b..6c181c64c91bc7daa213b1e3d9299b4b6e0e41b9 100644 --- a/product/ERP5Type/patches/ppml.py +++ b/product/ERP5Type/patches/ppml.py @@ -45,9 +45,7 @@ def convert(S, find=None): ### [\x00-\x1f] characters will be escaped to make a more ### readable output. try: - if isinstance(S, unicode): - S = S.encode('utf8') - else: + if not isinstance(S, unicode): S.decode('utf8') except UnicodeDecodeError: new = ''.join([reprs3.get(x) for x in S])