title: Ruby 1.9: Convert byte array to string with multibyte UTF-8 characters
body: <p>I am trying to find a way in Ruby to take a UTF-8 byte array and transform it back to a string.</p>
  
  <p>In irb (Ruby 1.9.2 preview 3) I can create the correct byte array from UTF-8 string: </p>
  
  <pre><code>ruby-1.9.2-preview3 &gt; 'Café'.bytes.to_a
   =&gt; [67, 97, 102, 195, 169]
  </code></pre>
  
  <p>However, I can't find a way to roundtrip from bytes back to an array. I tried to use Array.pack with the U* option, but that doesn't work for multibyte characters.</p>
  
  <pre><code>ruby-1.9.2-preview3 &gt; [67, 97, 102, 195, 169].pack('U*')
   =&gt; "CafÃ©"
  </code></pre>
  
  <p>Does anybody know a way to take a UTF-8 byte array with multibyte characters and convert it back to a string?</p>
  
  <p>Thanks.</p>