title: Lua string.format using UTF8 characters
body: <p>How can I get the 'right' formatting using string.format with strings containing UTF-8 characters?</p>
  
  <p>Example:</p>
  
  <pre><code>local str = "\xE2\x88\x9E"
  print(utf8.len(str), string.len(str))
  print(str)
  print(string.format("###%-5s###", str))
  print(string.format("###%-5s###", 'x'))
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>1   3
  ∞
  ###∞  ###
  ###x    ###
  </code></pre>
  
  <p>It looks like the <code>string.format</code> uses the byte length of the infinity sign instead of the "character length".
  Is there an UTF-8 string.format equivalent?</p>