diff --git a/frontends/src/jp/common.py b/frontends/src/jp/common.py index 3c7d6570..ff9fe74a 100644 --- a/frontends/src/jp/common.py +++ b/frontends/src/jp/common.py @@ -388,7 +388,7 @@ class BaseEdit(object): # we have probably an URL, we try to parse it import urlparse url = self.args.item - parsed_url = urlparse.urlsplit(url) + parsed_url = urlparse.urlsplit(url.encode('utf-8')) if parsed_url.scheme.startswith('http'): self.disp(u"{} URL found, trying to find associated xmpp: URI".format(parsed_url.scheme.upper()),1) # HTTP URL, we try to find xmpp: links @@ -418,14 +418,14 @@ class BaseEdit(object): self.disp(u"XMPP URI used: {}".format(url),2) # XXX: if we have not xmpp: URI here, we'll take the data as a file path - pubsub_service = parsed_url.path + pubsub_service = parsed_url.path.decode('utf-8') pubsub_data = urlparse.parse_qs(parsed_url.query) try: - pubsub_node = pubsub_data['node'][0] + pubsub_node = pubsub_data['node'][0].decode('utf-8') except KeyError: self.disp(u'No node found in xmpp: URI, can\'t retrieve item', error=True) self.host.quit(1) - pubsub_item = pubsub_data.get('item',[None])[0] + pubsub_item = pubsub_data.get('item',[None])[0].decode('utf-8') if pubsub_item is None and self.args.last_item: command = 'last' elif pubsub_item is not None: