From: rnv Date: Thu, 20 Jul 2017 08:30:37 +0000 (+0300) Subject: Merge request from N. CROUZET (fix from V7_8_0BR). X-Git-Tag: V8_4_0a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11388f60cc0c640b58ff1bb49d82ae08561dbb8d;p=tools%2Fyacsgen.git Merge request from N. CROUZET (fix from V7_8_0BR). --- 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()