Re-write encoding routines

Now original code clear of any legal issues.  svg.jsquote is removed, it
was not used.
Adjust comment