Reputation: 3
Under Windows I use MultiByteToWideChar(CP_ACP, ...) and WideCharToMultiByte(CP_UTF8, ...) for the conversion.
How do I do the same thing under OS X and Linux? I tried mbstowcs/wcstombs but the resulting char* is not UTF-8.
Upvotes: 0
Views: 463
Reputation: 100151
Look into iconv(3). that's the api you want. You'll need -liconv
.
Upvotes: 3