uri stored in the field nie:isStoredAs does not encode apostrophes "'" --- tracker-3.2.1 on opensuse Leap 15.4
charles@orca$ ls a\ filename\'s\ \ apostrophe\ \&\ ampersand\'s\ are\ difficut\ things\ for\ apps\ .jpg
a filename's apostrophe & ampersand's are difficut things for apps .jpg
charles@orca$ tracker3 info a\ filename\'s\ \ apostrophe\ \&\ ampersand\'s\ are\ difficut\ things\ for\ apps\ .jpg|grep isStored
'nie:isStoredAs' = 'file:///home/charles/Pictures/a%20filename's%20%20apostrophe%20&%20ampersand's%20are%20difficut%20things%20for%20apps%20.jpg'
charles@orca$ tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT nie:isStoredAs(?file) WHERE { ?file nao:hasTag ?tag FILTER regex(?tag, 'testimagedata', 'i')}"|sed -E '/^Results/d;/^$/d;s/^\s+//'
file:///home/charles/Pictures/a%20filename's%20%20apostrophe%20&%20ampersand's%20are%20difficut%20things%20for%20apps%20.jpg
charles@orca$ tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT nie:isStoredAs(?file) WHERE { ?file nao:hasTag ?tag FILTER regex(?tag, 'testimagedata', 'i')}"|sed -E '/^Results/d;/^$/d;s/^\s+//'|xargs eog 2>/dev/null
charles@orca$ #Eog could not read the uri
charles@orca$ tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT nie:isStoredAs(?file) WHERE { ?file nao:hasTag ?tag FILTER regex(?tag, 'testimagedata', 'i')}"|uridecode|uriencode
file:///home/charles/Pictures/a%20filename%27s%20%20apostrophe%20%26%20ampersand%27s%20are%20difficut%20things%20for%20apps%20.jpg
charles@orca$ tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT nie:isStoredAs(?file) WHERE { ?file nao:hasTag ?tag FILTER regex(?tag, 'testimagedata', 'i')}"|sed '/Results/d'|uridecode|uriencode
file:///home/charles/Pictures/a%20filename%27s%20%20apostrophe%20%26%20ampersand%27s%20are%20difficut%20things%20for%20apps%20.jpg
charles@orca$ tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT nie:isStoredAs(?file) WHERE { ?file nao:hasTag ?tag FILTER regex(?tag, 'testimagedata', 'i')}"|sed '/Results/d'|uridecode|uriencode|xargs eog
charles@orca$ #eog successfully opens the image
As illustrated above, the apostrophe character "'", is not encoded, which causes output from tracker-search and tracker-sparql to provide "inaccurate" locations if used through xargs or if used to create a list for other applications. (I use sparql to create collections of videos and images readable by gthumb).
uri from my example OVER corrected uri:
file:///home/charles/Pictures/a%20filename's%20%20apostrophe%20&%20ampersand's%20are%20difficut%20things%20for%20apps%20.jpg file:///home/charles/Pictures/a%20filename%27s%20%20apostrophe%20%26%20ampersand%27s%20are%20difficut%20things%20for%20apps%20.jpg
The "'" should be "%27"
My workaround, shown in the example, is to first decode the uri and then re-encode it with a couple of ridiculously simple python scripts.
I don't know if this is still an issue in more recent versions of tracker, and I doubt many folk would even notice, as even without the "'" encoded, I can still right click on the tracker-search/tracker-sparql output and successfully open the link in the default image viewer (or video player if a video file).