Problem Return TList

..
var
   CCliente : TCliente;
begin
CCliente := AClient.List<TCLIENTE>('$filter=(nome eq '+quotedStr(edtNome.text)+')&$orderby=nome desc');
...

Raises an exception with the message: No mapping for the Unicode character exists in the target multi-byte code page.

I'm consuming a server xdata using xdata.client

What am I doing wrong with this query?

It's always safer to percent encode the url before sending to client (uses Sparkle.Utils unit):


CCliente := AClient.List<TCLIENTE>('$filter=(nome eq '+TSparkleUtils.PercentEncode(quotedStr(edtNome.text))+')&$orderby=nome desc');
Thanks for the reply, I got it that way:

CCliente := ACliente.List<TCLIENTE>('$filter=nome%20eq%20'+TSparkleUtils.PercentEncode(QuotedStr(edtNOme.text))+'&$orderby=nome%20desc');

How could I use the LIKE expression in the filter?


Just use "like" instead "eq"