codegen: Treat input file as binary
authorDaiki Ueno <ueno@unixuser.org>
Fri, 16 Aug 2013 15:44:14 +0000 (17:44 +0200)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 17 Aug 2013 04:42:02 +0000 (06:42 +0200)
commita7f2765dbabf889df065e601fc072644dda625e4
tree5601a458bb3a5e56d5c2193331628564e6849b5d
parent1e945933d4709131730294df0f9076a4424e6e1c
codegen: Treat input file as binary

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