Finding Text ignoring diacritics

2 posts, 0 answers
  1. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 22 Mar 2011 Link to this post


    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?

  2. Ivailo Karamanolev
    Ivailo Karamanolev avatar
    276 posts

    Posted 23 Mar 2011 Link to this post

    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.

    the Telerik team
  3. DevCraft R3 2016 release webinar banner
Back to Top