Replace ucs2tochar* with ucs2_to_utf8* to handle Unicode