Q: My application uses Visual Studio's unicode character set. Your documentation says you support UTF8. Does that mean I can just call the DLL with my standard strings, "some string"L or _T("some string") or do I need to convert things to UTF8?
A: For UTF support, it depends on what you want to do.
If you’re just going to be using the first 128 characters of standard ascii then you can just pass in the strings. Something like
char mystr[]=“this is all ascii”; myfunction(mystr);
A: For UTF support, it depends on what you want to do.
If you’re just going to be using the first 128 characters of standard ascii then you can just pass in the strings. Something like
char mystr[]=“this is all ascii”; myfunction(mystr);
would be fine. This is because the UTF8 encoding preserves the first 128 ascii characters.
If you want to use UTF16 (ie “some string”L or _T(“some string”)) then you’ll have to convert the UTF16 to UTF8.
You can do that with the WideCharToMultiByte Windows function.