Ramya Vasanth created OLINGO-1515:
-------------------------------------
Summary: Support non-ascii characters in OData $search
Key: OLINGO-1515
URL: https://issues.apache.org/jira/browse/OLINGO-1515
Project: Olingo
Issue Type: Bug
Affects Versions: (Java) V4 4.8.0
Reporter: Ramya Vasanth
Non-ascii characters like á, ë etc in search-phrases, result in errors like the
following:
Exception during tokenizer creation with message 'Forbidden character in state
PHRASE->ë'.
As per odataV4 specification,
[https://github.com/oasis-tcs/odata-abnf/blob/master/abnf/odata-abnf-construction-rules.txt#L332-L356].
search expression can consist of either a searchWord, searchPhrase,
searchNegateExpr or searchParenExpr, optionally combined with and AND or OR
expression.
searchExpr = ( searchParenExpr / searchNegateExpr / searchPhrase / searchWord )
[ searchOrExpr / searchAndExpr ]
With the search phrase being defined as follows:
searchPhrase = quotation-mark 1*( qchar-no-AMP-DQUOTE / SP ) quotation-mark
Which is basically one-or-more percent-encoded characters without a
double-quote or a whitespace, flanked by two double-quotes.
So &$search=%22%C3%AB%22 (i.e. "ë") is a valid search phrase and should not
result in an error.
{{}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)