[gtk-mac-bundler] Deal with gobject-introspection including UTF8 characters in Gir files.



commit 6e2859f846762719546705dcbe98d180c27d378f
Author: John Ralls <jralls ceridwen us>
Date:   Fri Aug 16 13:11:26 2019 -0700

    Deal with gobject-introspection including UTF8 characters in Gir files.

 bundler/project.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bundler/project.py b/bundler/project.py
index b012876..734a206 100644
--- a/bundler/project.py
+++ b/bundler/project.py
@@ -386,11 +386,11 @@ class GirFile(Path):
             path, fname = os.path.split(filename)
             name, ext = os.path.splitext(fname)
 
-            with open (filename, "r") as source:
+            with open (filename, "r", encoding="utf8") as source:
                 lines = source.readlines()
             gir_file = os.path.join(gir_dest, fname)
             typelib = os.path.join(typelib_dest, name + '.typelib')
-            with open (gir_file, "w") as target:
+            with open (gir_file, "w", encoding="utf8") as target:
                 for line in lines:
                     target.write(re.sub(lib_path, self.bundle_path, line))
             call(['g-ir-compiler', '--output=' + typelib, gir_file])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]