diff --git a/ChangeLog b/ChangeLog index 8dd834d..c17a9b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-01-22 Thomas Vander Stichele + + * morituri/rip/debug.py: + Properly write utf-8 encoded strings to stdout. + 2012-01-22 Thomas Vander Stichele * morituri/common/program.py: diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py index c9bb5e7..82f8b2d 100644 --- a/morituri/rip/debug.py +++ b/morituri/rip/debug.py @@ -100,13 +100,14 @@ class MusicBrainzNGS(logcommand.LogCommand): self.stdout.write('%d releases\n' % len(metadatas)) for i, md in enumerate(metadatas): self.stdout.write('- Release %d:\n' % (i + 1, )) - self.stdout.write(' Artist: %r\n' % md.artist) - self.stdout.write(' Title: %r\n' % md.title) - self.stdout.write(' URL: %r\n' % md.url) - self.stdout.write(' Tracks: %r\n' % len(md.tracks)) + self.stdout.write(' Artist: %s\n' % md.artist.encode('utf-8')) + self.stdout.write(' Title: %s\n' % md.title.encode('utf-8')) + self.stdout.write(' URL: %s\n' % md.url) + self.stdout.write(' Tracks: %d\n' % len(md.tracks)) for j, track in enumerate(md.tracks): - self.stdout.write(' Track %2d: %r - %r\n' % ( - j + 1, track.artist, track.title)) + self.stdout.write(' Track %2d: %s - %s\n' % ( + j + 1, track.artist.encode('utf-8'), + track.title.encode('utf-8'))) class Debug(logcommand.LogCommand): summary = "debug internals"