Search found 70 matches

by saeid2016
Tue Apr 05, 2016 4:33 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

I have 2 points not 3 points!! 1. When we want to highlight a expression with two or more words, if that expression exists in our text but with any delimiters among its words (like , : ; / ...), the MarkSubStringW function can't find and highlight it. for example our text is : "Sergey / Tkachen...
by saeid2016
Tue Apr 05, 2016 12:50 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

To get marked items position and select them, I create a Text style in design time with color and back color that I want to pass to MarkSubStringW. After calling MarkSubStringW I get the list of marked items with this code: MarkedItemsIndexList := TStringList.Create; ... MarkedItemsIndexList.Clear; ...
by saeid2016
Sat Apr 02, 2016 6:12 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

As for the second question, you need to patch it as well, there is no standard solution (although, we are thinking about adding this functionality in TRichView.SearchText) Modify MarkSubString_: ... if P > 0 then ... // store RVData.GetSourceRVData and I end; ... (important, the code for storing mu...
by saeid2016
Fri Apr 01, 2016 5:11 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

I uploaded a fixed version. In addition to an important fix in the functions themselves, it has the following changes: 1) compatibility with XE5 and older is restored 2) Boolean parameters (IgnoreCase and WholeWords) are removed, the corresponding options are added in the Options parameter instead ...
by saeid2016
Mon Mar 28, 2016 7:28 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

There is one problem, though. The same text can be written differently - in decomposed form (where base characters and diacritic characters are separate) and in precomposed form (where they are represented as a single character). Yes this is a problem but solving it not very difficult, I am impatie...
by saeid2016
Sun Mar 27, 2016 11:37 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

Sorry, I do not understand Arabic, so I am afraid I cannot modify this function for you. However, if you look in MarkSearch.pas, you will see that it has function StrPosW(s, SubStr: PRVUnicodeChar): PRVUnicodeChar; This function is used to find SubStr in s. If you can modify it so that it handles d...
by saeid2016
Sat Mar 26, 2016 10:52 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

Well, this solution is far from optimal: - it requires disassembling strings to words - works only for whole words - recreates the original string, even if nothing was found. However, I can see how it could be implemented. We can create a function removing all diacritics from string, and making a m...
by saeid2016
Mon Mar 21, 2016 10:36 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

Well, Thank you Sergey, There is another way in my mind. that way is difining and using "?" & "*" or other characters in searching and highlighting, like searching in Windows. For example we can define "*" character instead of diacritics in MarkSubStringW function, ...
by saeid2016
Sat Mar 19, 2016 9:01 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

Thank you, I found this code in JavaScript: function stripDiacritics(rawString) { return rawString.replace(/ُ|ِ|َ|ٍ|ً|ّ/g,""); } function highlight() { var textblock = document.getElementById('textSection').innerHTML; var words = textblock.split(' '); var resultText = ''; for (var i=0; i <...
by saeid2016
Sat Mar 19, 2016 8:01 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 72955

Highlight search result in Arabic text

Hello, I use MarkSubStringW function to highlight search result in RichViewEdit. but there is a problem in Arabic texts which have diacritics. I want to search Arabic text that contains diacritics and highlight the matched words but I don't want the user to type the words with diacritics, because mo...