title: How do I convert among printed decimal/octal/hex/UTF-8 representations of a UTF-8 character from the command-line?
body: <p>In <a href="https://stackoverflow.com/questions/16596741/is-there-a-tool-equivalent-to-ascii1-but-for-utf-8">another question</a> someone suggested <code>echo -e</code> with <code>\0&lt;sequence&gt;</code> for octal, and <code>\x&lt;sequence&gt;</code> for hex.  E.g.:</p>
  
  <p><code>echo -e "\\0302\\0241"</code>  --> <code>¡</code></p>
  
  <p>Is there a simple way to convert in the other direction, from UTF-8 character to printed octal/hex sequence?</p>