Revert "Improve conversion from utf16 to utf8"

This reverts commit 0996530c76dcd386faa5776d9351efe3f510e0fb.

The previous commit crashes for whatever reason disposing images
during startup (see BL-797). There was no obvious reason why this
would crash, but it didn't seem important enough to spend a lot of
time debugging, so I decided to revert the change that causes the
crash.

Change-Id: I12488312c5aa26bd7e7cc326c14b2cdfc2277971