Fixed #32 (Unicode NFC normalizing track names)
This commit is contained in:
parent
e18a0bf410
commit
9828da7429
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import re
|
import re
|
||||||
from os.path import sep as pathSep
|
from os.path import sep as pathSep
|
||||||
|
from unicodedata import normalize
|
||||||
|
|
||||||
bitrateLabels = {
|
bitrateLabels = {
|
||||||
15: "360 HQ",
|
15: "360 HQ",
|
||||||
|
@ -17,6 +18,7 @@ bitrateLabels = {
|
||||||
def fixName(txt, char='_'):
|
def fixName(txt, char='_'):
|
||||||
txt = str(txt)
|
txt = str(txt)
|
||||||
txt = re.sub(r'[\0\/\\:*?"<>|]', char, txt)
|
txt = re.sub(r'[\0\/\\:*?"<>|]', char, txt)
|
||||||
|
txt = normalize("NFC", txt)
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def fixEndOfData(bString):
|
def fixEndOfData(bString):
|
||||||
|
|
Loading…
Reference in New Issue