I've raised FCREPO-569 for this, but I'd be interested to know if anyone
else has had similar experiences, or could reproduce this on different
platforms (I've only tested on Windows).
 
I've found that multibyte utf-8 characters used as literals in iTQL "select"
queries do not seem to be correctly decoded, resulting in incorrect query
results.
 
eg
select $s $p $o from <#ri> where $s $p $o and $s $p 'C'
 
This works fine in the risearch web interface.
 
The url-encoded version is:
 
select+%24s+%24p+%24o+from+%3c%23ri%3e+where+%24s+%24p+%24o+and+%24s+%24p+%2
7%c2%a9%27
 
The copyright symbol is url-encoded as the 2-byte sequence %c2%a9
 
Using this in a REST risearch query (ie GET) returns no results.  However
using the ASCII equivalent for the copyright symbol, ie just %a9, works fine
- it looks like the decoding of the query parameter is incorrect.
 
So this version works fine:
 
select+%24s+%24p+%24o+from+%3c%23ri%3e+where+%24s+%24p+%24o+and+%24s+%24p+%2
7%a9%27
 
The full query URL for this working (but incorrectly encoded) version is:
http://localhost:8080/fedora/risearch?query=select+%24s+%24p+%24o+from+%3C%2
3ri%3E+where+%24s+%24p+%24o+and+
<http://localhost:8080/fedora/risearch?query=select+%24s+%24p+%24o+from+%3C%
23ri%3E+where+%24s+%24p+%24o+and+%24s+%24p+%27%c2%a9%27&type=tuples&lang=itq
l&flush=true&format=Sparql>
%24s+%24p+%27%c2%a9%27&type=tuples&lang=itql&flush=true&format=Sparql
 
Changing %27%a9%27 to the correct utf-8 url-encoded version
%24p+%27%c2%a9%27 means no results are returned.
 
 
Regards
Steve
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to