Fixed UTF-16 string -> UTF-8 array conversion.

Currently if one creates code e.g. with text:

    ääääääää

And code is scanned with android, some chinese letters are shown.