diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2019-09-25 01:54:12 +0300 |
---|---|---|
committer | Alexander Akulich <akulichalexander@gmail.com> | 2019-09-25 01:54:44 +0300 |
commit | 45ca39448d90d960fa003d3e5e118453fb7dceab (patch) | |
tree | b9af6fb37091708afc0b7c29c8271b30e63b01a8 | |
parent | 739afb4e9ef4a0b3ee124d0a188757069791b1a6 (diff) | |
download | telepathy-glib-45ca39448d90d960fa003d3e5e118453fb7dceab.tar.gz |
xincludator.py: Fix behaviour on LANG=C
Use UTF-8 encoding instead of 'None', because spec XMLs contain
non-ASCII symbols, such as copyright sign.
-rw-r--r-- | tools/xincludator.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/xincludator.py b/tools/xincludator.py index d63389e4b..2b8c42751 100644 --- a/tools/xincludator.py +++ b/tools/xincludator.py @@ -38,9 +38,10 @@ if __name__ == '__main__': xincludate(dom, argv[0]) if sys.version_info[0] >= 3: - xml = dom.toxml(encoding=None) + xml = dom.toxml('utf-8') + stdout.buffer.write(xml) + stdout.buffer.write(b'\n') else: xml = dom.toxml() - - stdout.write(xml) - stdout.write('\n') + stdout.write(xml) + stdout.write('\n') |