The decoder has been doing fine at home for a week or so -
but my turf is only a very small area in the realm of unicode.
So - for the common good - please give it a spin,wherever you are.
On scary/dubious sightings - tell some1.
Copy the codeblock to terminal/into script - and run.
Output goes to /root
You may want to have some roxbookmarks -with non-ascii-chars.
Code: Select all
function decode_roxxml() {
#ovo===========================================================
#tool to decode xml 1.0 encoded unicode content into
# a system- and human-friendly form.
# input:file "$1" (any file of relevance/interest)
# output:out-echoed decoded input
#
# 2014/09/21 by some1 at http://www.murga-linux.com/puppy
#===========================================================o-o
/usr/bin/printf "$(LANG=C;
awk --posix 'BEGIN {a["&"] = "\\046";a["'"] = "\047";
a["""] = "\042";a[">"] = "\076";a["<"] = "\074"}
{t=$0;
{while (match(t,/&((#x[0-9A-F]{2,5})||(amp|gt|lt|quot|apos));/)){\
s=substr(t,RSTART,RLENGTH);
if (!a[s]){\
y=s;sub(/&#x/,"",y);sub(/;/,"",y);
if (length(y) > 4){a[s]="\\U" sprintf("%08s", y)} else a[s]="\\u" sprintf("%04s", y);
};
gsub(s,a[s],t);
}
}print t}' "$1")"
#===========================================================o^o
}
todecode="/root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml"
decode_roxxml "$todecode" >/root/wysiwyg_from_"${todecode##*'/'}"
geany "$todecode" /root/wysiwyg_from_"${todecode##*'/'}"
A pic showing some specs,no bling: