From 9828da7429466cd285dc56c9c3a2a808574264ad Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 27 Aug 2020 11:37:30 +0200 Subject: [PATCH] Fixed #32 (Unicode NFC normalizing track names) --- deemix/utils/pathtemplates.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deemix/utils/pathtemplates.py b/deemix/utils/pathtemplates.py index aef5ef7..7e2fbd4 100644 --- a/deemix/utils/pathtemplates.py +++ b/deemix/utils/pathtemplates.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import re from os.path import sep as pathSep +from unicodedata import normalize bitrateLabels = { 15: "360 HQ", @@ -17,6 +18,7 @@ bitrateLabels = { def fixName(txt, char='_'): txt = str(txt) txt = re.sub(r'[\0\/\\:*?"<>|]', char, txt) + txt = normalize("NFC", txt) return txt def fixEndOfData(bString):