From 03a38da996e09c44081d24c897ff47e8e268145f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Aug 2025 09:37:13 +0530 Subject: [PATCH] Also ensure insert special character normalizes to NFC --- src/calibre/gui2/tweak_book/char_select.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/char_select.py b/src/calibre/gui2/tweak_book/char_select.py index 93cd726ce3..2be24c9d3b 100644 --- a/src/calibre/gui2/tweak_book/char_select.py +++ b/src/calibre/gui2/tweak_book/char_select.py @@ -6,6 +6,7 @@ __copyright__ = '2014, Kovid Goyal ' import re import textwrap +import unicodedata from bisect import bisect from functools import partial @@ -843,7 +844,7 @@ class CharSelect(Dialog): self.parent().activateWindow() w = self.parent().focusWidget() e = QInputMethodEvent('', []) - e.setCommitString(c) + e.setCommitString(unicodedata.normalize('NFC', c)) if hasattr(w, 'no_popup'): oval = w.no_popup w.no_popup = True