I'm not too familiar with Unicode, but I'm guessing you'd need to get a library that converts between UTF16 & UTF32...
I know with UTF8 you can use English strings the same as ASCII strings, but once you get into languages like Chinese (which doesn't fit into 1 byte) it combines several bytes together for each character. I'm guessing the same kind of thing is true for UTF16 & UTF32 (i.e. English strings are the same as ASCII, except with 1 or 3 NUL characters padding, which you are just chopping off).
I know that my answer is too simple but I am just saying it.
Why don't you create your won procedure to convert using arrays, getting every single character from string and putting into array (where the size of array will be variable which you get from the system, like size of wchar,..., max length, and so on).
Once I did so and it works (at least in different windows platforms, I didn't use solaris till now).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.