View Single Post
Old 06-26-2024, 08:31 AM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,837
Karma: 6120478
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by kovidgoyal View Post
Normalize to NFC both the needle and the haystack when searching. That is the only sane way to do this. And normalize HTML to NFC on save and on load, and when getting the text from QPlainTextEdit in order to perform any operation on it.
I already overload toPlainText in my TextDocument class to handle QTextDocument's insane handling of nbsp, so that part would be easy.

I can force NFC form every time the QTextDocument get loaded as well.
I can force NFC form when the epub is loaded and saved.

I can intercept copying out of a TextDocument, so I can can force it to NFC form as well.

That just leaves any keyboard input method that produces decomposed form. I am not sure how big an issue that is.

and

Pasting off the system clipboard from other apps into the Find and Replace Fields, and directly into the Text.

I find that system copy paste on macOS can not be intercepted at times.

Any suggestions on how to handle any of those cases?

Thanks,

KevinH
KevinH is offline   Reply With Quote