2

I’m using QtWebKit (QWebView) to display text, and I want to implement a search functionality in it via QWebView::findText.

Problem is that the text that has to be displayed contains so-called Unicode’s Combining Diacritical Marks, and both QWebView::findText() and JavaScript’s window.find() don’t ignore those “marks” (characters) although they should.

For example, if there’s a word “ti̇̀krăs” (“t”, “i”, Combining Dot Above, Combining Grave Accent, “k”, “r”, “a”, Combining Breve, “s”) in the text, findText() is unable to find that word when searching for query “tikras” (“t”, “i”, “k”, “r”, “a”, “s”).

Other WebKit-based browsers (Chrome, Safari) seem to work fine in this case.

Is there anything I can do about this situation?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Linas Valiukas
  • 1,316
  • 1
  • 13
  • 23
  • What's your use case for ignoring diacritical marks? – Sebastian Negraszus Dec 22 '12 at 11:27
  • In my case, I'm developing a dictionary application which uses diacritical marks to explain accentuation of various words. However, the user should be able to, say, find the word "tikras" (without diacritical marks) in the text even though the word is written as "ti̇̀krăs" (with diacritical marks). Also, this is the default behavior in Chrome and some other WebKit-based browsers. – Linas Valiukas Dec 23 '12 at 11:36

0 Answers0