Commits

Anonymous committed cee0fe3

BUGFIX: When filenames have encoding errors, log.warning will throw an exception. Corruptly encoding strings should not be directly printed.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 77: ordinal not in range(128)

For example, the following filename:
"074. Georg Friederich H\u221a\u00a7ndel - Serse (HWV 40) - Ombra Mai F\u221a\u03c0.mp3"

  • Participants
  • Parent commits 23c9256

Comments (0)

Files changed (1)

File src/eyed3/id3/tag.py

                 # Work around the local encoding not matching that of a mounted
                 # filesystem
                 log.warning(u"Mismatched file system encoding for file '%s'" %
-                            file_name)
+                            repr(file_name))
                 self.name = file_name
 
         self.tag_size = 0  # This includes the padding byte count.