diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2011-03-30 17:15:16 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2011-03-30 20:31:54 +0100 |
commit | 87cdefd461dfe8d3bfa4055f78bdb514c31ccf09 (patch) | |
tree | 9895518a494b9676e99c620191f5a648bfe4ba89 | |
parent | 0db439ab4e84ff49c7f4011093c7df74097dc781 (diff) |
jamendo: Fix encoding problems with non-ASCII track names
Ensure that track names are uniformly decoded as UTF-8, and never re-encoded
as ASCII. Attempting to re-encode them as ASCII was causing non-ASCII track
names to (obviously) blow things up.
Helps: bgo#646245
-rw-r--r-- | src/plugins/jamendo/jamendo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/jamendo/jamendo.py b/src/plugins/jamendo/jamendo.py index 5619cf3b..6b7082f6 100644 --- a/src/plugins/jamendo/jamendo.py +++ b/src/plugins/jamendo/jamendo.py @@ -287,7 +287,7 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable): # track title # Translators: this is the title of a track in Python format # (first argument is the track number, second is the track title) - tt = ('<small>%s</small>' % _(u'%02d. %s')) % \ + tt = (u'<small>%s</small>' % _(u'%02d. %s')) % \ (i+1, self._format_str(track['name'])) # track duration td = self._format_duration(track['duration']) @@ -603,7 +603,7 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasGtk.Configurable): if not st: return '' try: - return escape(st.encode('utf8')) + return escape (unicode (st)) except: return st |