in reply to Re^4: best way to convert to UTF8 from UTF16
in thread best way to convert to UTF8 from UTF16

You have it backwards. What moritz posted wasn't an example, it was what you should actually use. On the other hand, the code you copied from the docs was an example.
  • Comment on Re^5: best way to convert to UTF8 from UTF16