Within Trados Studio 2019:
I can get search results for the following: "Apple | Banana", and "|"
Within Translation Memory Api:
I can get search results for the following: "Apple | Banana", but searching for "|" returns 0 hits.
These are my search settings:
string searchFor = "|";
FileBasedTranslationMemory tm = new FileBasedTranslationMemory(TranslationMemoryPath);
int totalTmTranslationUnitCount = tm.LanguageDirection.GetTranslationUnitCount();
SearchSettings sdlSearchSettings = new SearchSettings();sdlSearchSettings.Mode = SearchMode.ConcordanceSearch;
sdlSearchSettings.MinScore = 70;
sdlSearchSettings.MaxResults = totalTmTranslationUnitCount;
SearchResults results = tm.LanguageDirection.SearchText(sdlSearchSettings, searchFor);
Any ideas on how to get hits on only the pipe character?
Hello Samuel Baldus,
Have you tried to use the Unicode Char, instead of "|" itself when doing the search? It might help in your case, please check: https://www.fileformat.info/info/unicode/char/7c/index.htm for the unicode.
I tried your suggestion, entering "U+0007C" instead of "|", however it did not produce an hits.
I have a temporary workaround though, by looping through all of the translation units and looking for IndexOf("|"). It takes a lot longer but does the job for the time being.