Unicode conversion


for char to wchar conversion you are using “mbstowcs”, and this uses system Locale for the conversion

How can I specify a differnet Locale for the conversion

And of course for the reverse function, “wcstombs”

I guess you could set the locale using the c runtime library functions… it’s not something I’ve ever tried to do, TBH.

I don’t want to change the system locale, I just have to specify the charset of the ascii string so the conversion will be done with a different locale.

I know MultiByteToWideChar Win32 API does this but I would prefer to do it multi-platform.

Yeah, that’s the sort of thing that I should add to the string class, but haven’t got round to it yet… In the meantime it’s probably only a couple of lines of code to do yourself.


I can do my conversion till your cross-platform is ready.