telepathy-qt: xincludator.py: Fix behaviour on LANG=C
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Mon Oct 14 21:25:17 UTC 2019
Module: telepathy-qt
Branch: master
Commit: e2c1c59ef91e2589192c264e8cc280439283724e
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=e2c1c59ef91e2589192c264e8cc280439283724e
Author: Alexander Akulich <akulichalexander at gmail.com>
Date: Wed Sep 25 01:48:22 2019 +0300
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.
---
tools/xincludator.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/xincludator.py b/tools/xincludator.py
index d63389e4..2b8c4275 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')
More information about the telepathy-commits
mailing list