perl -wpC -e 's/(.)/sprintf "U+%04X ", ord $1/eg'
Which is essentially the same, but your version is better because it leaves the ASCII data alone.
In reply to Re: View Unicode in hex
by gaal
in thread View Unicode in hex
by graff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |