Calling SDL_iconv_utf8_ucs2 fails on Ubuntu for me. It seems that it’s
caused by using system iconv implementation on Linux
systems. SDL_iconv_utf8_ucs2 uses “UCS-2-INTERNAL” as a tocode. Running
"iconv -l | grep UCS" on my Ubuntu (14.10) gives such results:
It seems that system iconv know nothing about “UCS-2-INTERNAL”.
Changing SDL_iconv_utf8_ucs2 to:
(Uint16*)SDL_iconv_string(“UCS-2”, “UTF-8”, event.text.text,
SDL_strlen(event.text.text) + 1);
seems to be fixing problem. But I think it’s still a bug when
SDL_iconv_utf8_ucs2() doesn’t work on some platforms.