Virtuoso SPARQL Replace Function Bug and Workaround
Running the following SPARQL for replacing %c3%85
with the letter Å
runs as expected
However, when using nested REPLACE
statements with an outer replace having a regex with .
, the replace function “jumps” back one character where the match is found :
This only happens for some replace characters including all of ÆØÅæøå
. Workaround for this is to run a CONCAT
before the second REPLACE
, which seems to “reset” the string before sending it to next REPLACE
:
This was tested using Virtuoso version 07.20.3212 on Linux (x86_64-unknown-linux-gnu), Single Server Edition with Virtuoso SPARQL Query Editor
I also made an issue on Github at Openlink/Virtuoso in case they fix this :)