I use non-UTF8 (KOI8-R) locale but `qpdfview` no longer opens non-UTF8 paths.
The menu item opens the file directly using `qpdfview`
if the full path is UTF8-encoded. If not the code creates ASCII-only symlink
in `~/home/tmp/` that encodes the full path in its name to make `qpdfview`
store session info for the file.
v View pdf
pdftotext -layout -q %f - | iconv.py -f utf-8 | ${PAGER:-more}
-+= t lr & f \.(pdf|PDF)$
++ t lr & f \.(pdf|PDF)$
e View pdf with evince
evince %f &
++= t lr & f \.(pdf|PDF)$
+e View pdf with qpdfview
+ if [ "%d/%f" = "`echo %d/%f | iconv -t utf-8`" ]; then qpdfview %f & else src=%d/%f; dest="$HOME/tmp/`echo $src | koi2lat | sed 's!/!%!g'`"; ln -s "$src" "$dest" && qpdfview "$dest" & (sleep 3; exec rm -f "$dest") & fi
+
+= t lr & f \.djvu(\.bz2|\.gz)?$
e View djvu
djview %f &