Problem with searching special characters
Hello,
I have written a plugin to search text from the PDF document using search plugin HFT functions.
I can very well search the plain text without any special characters in it.
But when search text contains special characters then It could not search the whole search text.
Here is my code snippet:
ASText searchKey = ASTextFromScriptText(searchText, kASEUnicodeScript);
SearchQueryDataRec srcQuery;
memset(&srcQuery, 0, sizeof (SearchQueryDataRec));
srcQuery.size = sizeof(SearchQueryDataRec);
srcQuery.query = searchKey;
srcQuery.type = kSearchActiveDoc;
srcQuery.match = kMatchAllWords;
srcQuery.options = kWordOptionWholeWord | kSearchEveryWhere;
srcQuery.scope = kSearchDocumentText;
srcQuery.path = NULL;
srcQuery.fs = NULL;
srcQuery.maxDocs = 1;
ASBool ret = SearchExecuteQueryEx(&srcQuery);
ASTextDestroy(searchKey);
For example:
If I want to search the below highlighted text then It does not search.

However I can very well search the below text:

Please let me know where I am going wrong.
Thanks.
