Adds a test case for decoding UTF-8 strings and fixes this bug

Multibyte strings were not being encoded back into UTF-8, so I wrote a test case (and fixed the bug)