]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Merge request from N. CROUZET (fix from V7_8_0BR). V8_4_0a1 V8_4_0a2
authorrnv <rnv@opencascade.com>
Thu, 20 Jul 2017 08:30:37 +0000 (11:30 +0300)
committerrnv <rnv@opencascade.com>
Thu, 20 Jul 2017 08:30:37 +0000 (11:30 +0300)
module_generator/gener.py

index 38a9e90d2ad5b28e6d3a6c0a143c2fcba1ff7a9a..a8f722607b136e3c5f46fd7bda480cce120b9445 100644 (file)
@@ -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()