From 0cfa42aad4ecdbd3c98f308cfe072ebadda26e72 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 20 Jul 2017 11:30:37 +0300 Subject: [PATCH] Merge request from N. CROUZET (fix from V7_8_0BR). --- module_generator/gener.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module_generator/gener.py b/module_generator/gener.py index 38a9e90..a8f7226 100644 --- a/module_generator/gener.py +++ b/module_generator/gener.py @@ -817,7 +817,10 @@ ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) """ for name, content in dic.items(): filename = os.path.join(basedir, name) - if isinstance(content, str): + if isinstance(content, basestring): + if isinstance(content, unicode): + # encodage to utf-8 if unicode string + content=content.encode('utf8') fil = open(filename, 'w') fil.write(content) fil.close() -- 2.39.2