Search found 73 matches

by saeid2016
Fri Apr 15, 2016 12:01 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

Please help to do this.
by saeid2016
Thu Apr 07, 2016 1:35 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

This feature is not supported, but you can try to implement it yourself.
It can be implemented in the same way as ignoring diacritics.

Modify RVPreprocessString (used to normalize the string to find) and RVPreprocessStringRaw (used to normalize strings in text). They must return string with ...
by saeid2016
Tue Apr 05, 2016 6:59 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

1. Currently, the only search that supports searching in multiple items is SearchText method. MarkSubString searches in each item separately.
It's not very simple to implement multiitem search. It will be implemented, but currently I am not ready to do it, because immediately after releasing of ...
by saeid2016
Tue Apr 05, 2016 4:33 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 / Tkachenko ...
by saeid2016
Tue Apr 05, 2016 12:50 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Sat Apr 02, 2016 6:12 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Fri Apr 01, 2016 5:11 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Mon Mar 28, 2016 7:28 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Sun Mar 27, 2016 11:37 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Sat Mar 26, 2016 10:52 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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 ...
by saeid2016
Mon Mar 21, 2016 10:36 am
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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, then when user typed any words to ...
by saeid2016
Sat Mar 19, 2016 9:01 pm
Forum: Support
Topic: Highlight search result in Arabic text
Replies: 28
Views: 132609

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: 132609

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 ...