So I have standard C string:
char* name = \"Jakub\";
And I want to convert it to UTF-16. I figured out, that UTF-16 will be twice as lo
output[i] = input[i];
This will assign every other byte of the input, because you increment i by 2. So no wonder that you obtain "Jkb". You probably wanted to write:
i
"Jkb"
output[i] = input[i / 2];