From b9a6df1ce8efa05bacccad67691a07a3a529ae8f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Apr 2022 10:47:24 +0530 Subject: [PATCH] Use the regex implementation as it is faster --- src/calibre/utils/icu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/utils/icu.py b/src/calibre/utils/icu.py index db31a729a5..a198bfd2bb 100644 --- a/src/calibre/utils/icu.py +++ b/src/calibre/utils/icu.py @@ -317,6 +317,8 @@ def remove_accents_regex(txt: str) -> str: return normalize('NFKC', pat.sub('', normalize('NFKD', txt))) +remove_accents = remove_accents_regex # more robust and faster + ################################################################################ if __name__ == '__main__': from calibre.utils.icu_test import run