diff --git a/beets/library.py b/beets/library.py index b33ca8919..8a392384c 100644 --- a/beets/library.py +++ b/beets/library.py @@ -18,6 +18,7 @@ import re import sys import logging import shlex +import unicodedata from unidecode import unidecode from beets.mediafile import MediaFile from beets import plugins @@ -877,6 +878,7 @@ class Library(BaseLibrary): subpath = subpath_tmpl.substitute(mapping, funcs) # Encode for the filesystem, dropping unencodable characters. + subpath = unicodedata.normalize('NFD', subpath) if isinstance(subpath, unicode) and not fragment: encoding = sys.getfilesystemencoding() or sys.getdefaultencoding() subpath = subpath.encode(encoding, 'replace') diff --git a/docs/changelog.rst b/docs/changelog.rst index c4284b211..8ea447053 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -22,6 +22,7 @@ Changelog file for easy importing to other systems. Thanks to Fabrice Laporte. * :doc:`/plugins/bpd`: Use Gstreamer's ``playbin2`` element instead of the deprecated ``playbin``. +* Filenames are normalized with Unicode Normal Form D (NFD). 1.0b13 (March 16, 2012) diff --git a/test/rsrc/test.blb b/test/rsrc/test.blb index b4e0ddf79..f7883366b 100644 Binary files a/test/rsrc/test.blb and b/test/rsrc/test.blb differ