summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2013-09-21 12:17:12 -0400
committerShaun McCance <shaunm@gnome.org>2013-09-21 12:17:12 -0400
commit309b2cee105430c5ed387d7862e9405d41e76088 (patch)
treec9a92576c5c50ea27de1726aa0dc6dd3db2c51bc
parentcf30d00a9d4802f9d7479d28a4a3ce420bc36aaf (diff)
downloaditstool-309b2cee105430c5ed387d7862e9405d41e76088.tar.gz
Fix utf8 issue introduced in Sep 20 commit
-rwxr-xr-xitstool.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/itstool.in b/itstool.in
index db6627a..aa5b17f 100755
--- a/itstool.in
+++ b/itstool.in
@@ -209,9 +209,10 @@ class Message (object):
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
if node.ns() is not None and node.ns().name is not None:
- self._message[-1] += ('<%s:%s' % (node.ns().name, node.name))
+ self._message[-1] += (u'<%s:%s' % (unicode(node.ns().name, 'utf-8'),
+ unicode(node.name, 'utf-8')))
else:
- self._message[-1] += ('<%s' % node.name)
+ self._message[-1] += (u'<%s' % unicode(node.name, 'utf-8'))
if node.properties is not None:
for prop in node.properties:
if prop.type == 'attribute':
@@ -233,9 +234,10 @@ class Message (object):
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
if node.ns() is not None and node.ns().name is not None:
- self._message[-1] += ('</%s:%s>' % (node.ns().name, node.name))
+ self._message[-1] += (u'</%s:%s>' % (unicode(node.ns().name, 'utf-8'),
+ unicode(node.name, 'utf-8')))
else:
- self._message[-1] += ('</%s>' % node.name)
+ self._message[-1] += (u'</%s>' % unicode(node.name, 'utf-8'))
def is_empty (self):
return self._empty