[OLINGO-1515]Support non-ascii characters in OData

This commit is contained in:
ramya vasanth 2021-03-03 12:58:30 +05:30
parent 1c1b3c3a9d
commit 162750f2ce
2 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,9 @@ public class SearchTokenizer {
*/
static boolean isAllowedPhrase(final char character) {
// the '%' is allowed because it is assumed that it was percent encoded and is now decoded
return isQCharUnescaped(character) || character == '%';
return isQCharUnescaped(character)
|| character == '%'
|| Character.isUnicodeIdentifierStart(character);
}
/**

View File

@ -81,6 +81,7 @@ public class SearchParserTest {
testUri.run("ESTwoKeyNav", "$search=\"abc\"");
testUri.run("ESTwoKeyNav", "$search=\"a\\\"bc\"");
testUri.run("ESTwoKeyNav", "$search=%22abc%22");
testUri.run("ESTwoKeyNav", "$search=%22a%C3%AB%22");
testUri.run("ESTwoKeyNav", "$search=%22a%5C%22bc%22");
testUri.run("ESTwoKeyNav", "$search=%22a%5C%5Cbc%22");