projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e94593
)
codegen: Treat input file as binary
author
Daiki Ueno
<ueno@unixuser.org>
Fri, 16 Aug 2013 15:44:14 +0000
(17:44 +0200)
committer
Daiki Ueno
<ueno@unixuser.org>
Sat, 17 Aug 2013 04:42:02 +0000
(06:42 +0200)
Under C locale, open() in Python 3 sets the file encoding to ASCII.
As expat looks at encoding="..." in XML declaration, gdbus-codegen can
simply open the input file as binary and let expat decode the content.
https://bugzilla.gnome.org/show_bug.cgi?id=696633
gio/gdbus-2.0/codegen/codegen_main.py
patch
|
blob
|
history
diff --git
a/gio/gdbus-2.0/codegen/codegen_main.py
b/gio/gdbus-2.0/codegen/codegen_main.py
index
aa7984e
..
69cf3e7
100755
(executable)
--- a/
gio/gdbus-2.0/codegen/codegen_main.py
+++ b/
gio/gdbus-2.0/codegen/codegen_main.py
@@
-166,7
+166,7
@@
def codegen_main():
all_ifaces = []
for fname in args:
- f = open(fname)
+ f = open(fname
, 'rb'
)
xml_data = f.read()
f.close()
parsed_ifaces = parser.parse_dbus_xml(xml_data)