[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 05/06: grc: save grc files utf-8 encoded (#
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 05/06: grc: save grc files utf-8 encoded (#792) |
Date: |
Sun, 14 Jun 2015 16:34:14 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 42c892c92d13ba8803983db118f018e5d6b9f9b9
Author: Sebastian Koslowski <address@hidden>
Date: Tue Jun 2 16:14:31 2015 +0200
grc: save grc files utf-8 encoded (#792)
---
grc/base/ParseXML.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/grc/base/ParseXML.py b/grc/base/ParseXML.py
index c9dbccf..2d5fed0 100644
--- a/grc/base/ParseXML.py
+++ b/grc/base/ParseXML.py
@@ -123,8 +123,9 @@ def to_file(nested_data, xml_file):
xml_data += etree.tostring(etree.ProcessingInstruction(
'grc', ' '.join(
"{0}='{1}'".format(*item) for item in instructions.iteritems())
- ), xml_declaration=True, pretty_print=True)
- xml_data += etree.tostring(_to_file(nested_data)[0], pretty_print=True)
+ ), xml_declaration=True, pretty_print=True, encoding='utf-8')
+ xml_data += etree.tostring(_to_file(nested_data)[0],
+ pretty_print=True, encoding='utf-8')
with open(xml_file, 'w') as fp:
fp.write(xml_data)
@@ -147,7 +148,7 @@ def _to_file(nested_data):
for value in values:
node = etree.Element(key)
if isinstance(value, (str, unicode)):
- node.text = value
+ node.text = unicode(value)
else:
node.extend(_to_file(value))
nodes.append(node)
- [Commit-gnuradio] [gnuradio] branch maint updated (e8165e7 -> 1ff0e74), git, 2015/06/14
- [Commit-gnuradio] [gnuradio] 03/06: grc: better Popen argument handling for CLI based apps, git, 2015/06/14
- [Commit-gnuradio] [gnuradio] 05/06: grc: save grc files utf-8 encoded (#792),
git <=
- [Commit-gnuradio] [gnuradio] 01/06: grc: stop using gtk forall() (#793), git, 2015/06/14
- [Commit-gnuradio] [gnuradio] 02/06: grc: fix file load error when connections are not unique (#794), git, 2015/06/14
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2015/06/14
- [Commit-gnuradio] [gnuradio] 04/06: grc: clean-up ParseXML, git, 2015/06/14