http://qs321.pair.com?node_id=988217


in reply to Regex to convert non-printable to printable char

This seems to be just what the tr operator is for.

Bill