Some queries encoded as UTF-8 that I send to a server are not returning the expect results.
i.e
is only returning two results (results are returned as Xml) in my application and only 2 results if I put directly into Firefox browser
However if I put the non-encoded url value into Firefox
http://direct.jthinkws.com?type=release&query=artist:(Dinosaur~0.7 AND Jr.) AND (+track:"Forget The Swan" +track:"Just Like Heaven" ) AND tracks:[2 TO 100] AND src:1&limit=20&offset=0
it returns 44 files
and from my server I can see I get the following request which I assume must be firefox encoding the data
as you can see it is encoding it slightly differently - spaces are being converted to '%20' not '+' and '(' and ')' are not converted.
I dont understand the difference and why one works and one doesn't, also why the one that doesnt work does return some results just not as many.
(Also I tried encoding as ISO-8859-1 instead of UTf-8) and that completely failed the server couldnt decode it so Im sure UTf8 is the correct encoding.
My code is written in Java and its encodes the value of the query using UREncoder, i.e
String query = URLEncoder.encode(queryValue.toString(), StandardCharsets.UTF_8.name());