Add function for unicode NFC normalize.
This commit is contained in:
parent
f98364b814
commit
da8d1d6224
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@ import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
from voussoirkit import getpermission
|
from voussoirkit import getpermission
|
||||||
from voussoirkit import safeprint
|
from voussoirkit import safeprint
|
||||||
|
@ -27,6 +28,8 @@ hyphen = '-'
|
||||||
quote = '"'
|
quote = '"'
|
||||||
space = ' '
|
space = ' '
|
||||||
underscore = '_'
|
underscore = '_'
|
||||||
|
def unicode_normalize(s):
|
||||||
|
return unicodedata.normalize('NFC', s)
|
||||||
|
|
||||||
def brename(transformation, autoyes=False, recurse=False):
|
def brename(transformation, autoyes=False, recurse=False):
|
||||||
if recurse:
|
if recurse:
|
||||||
|
|
Loading…
Reference in a new issue