SharePoint 2013 REST API odata $filter ignores uni

2019-07-24 05:56发布

I'm trying to use SharePoint 2013 REST API (odata) with unicode characters such as umlauts (ä ö ü).

...?$select=Title%2CID&$filter=substringof%28%27hello%20w%F6rld%27%2C%20Title%29&$orderby=ID%20desc&$top=14

^^ should search for "hello w*ö*rld" using substringof('...', Field)

I'm escaping the URL correctly (and also single quotes with double quotes) and filtering works for all kinds of characters (even backslash and quotes), however, entering ä/ö/ü or any other unicode character has no effect, it is as if those characters were simply filtered out on the server side (i can insert a lot of ääääääs without changing the results).

Any idea how to escape those? I tried the obvious (%ab { \u1234 \xab x1234) without success. Can't find anything on the web or in the specs either.

Thanks for suggestions.


UPDATE - SOLVED

I found that you can use the %uhhhh variant of escaping them:

?$filter=substringof('hello w%u00f6rld') 

Of course one must only escape that once (i.e. not the whole thing again), but it seems that's the way to go.

(can't answer my own question now lol)

0条回答
登录 后发表回答