This is a migrated thread and some comments may be shown as answers.

Finding Text ignoring diacritics

1 Answer 33 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Daní
Top achievements
Rank 1
Daní asked on 22 Mar 2011, 12:56 PM
Hello,

I'm using DocumentTextSearch to search and highlight text in RichTextBox. I'd like searcher igonores case and diacritics. I can provide RegexOptions in DocumentTextSearch constructor to ignore case but I don't how to ignore diacritics. Using CompareInfo class defined in System.Globalization namespace, I can perform text searches on string using CompareOption.IgnoreNonSpace option to ignore diacritics. Is there any way to do the same with DocumentTextSearch?

Thanks

1 Answer, 1 is accepted

Sort by
0
Ivailo Karamanolev
Telerik team
answered on 23 Mar 2011, 03:23 PM
Hello DanĂ­,

Currently, DocumentTextSearch only supports Regex. As I'm not aware of any way to ignore diacritics with Regex, it will not do the job.
However, DocumentTextSearch is implemented on top of DocumentTextMap, which will allow you to get search matches from plain text yourself. If you open a support ticket, I can send you the source code for DocumenTextSearch so you can modify it to suit your needs.

Greetings,
Ivailo
the Telerik team
Tags
RichTextBox
Asked by
Daní
Top achievements
Rank 1
Answers by
Ivailo Karamanolev
Telerik team
Share this question
or