Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

utf-8 support in sdk/plugin api

If you use Printf(), Qprintf(), and QPuts(), output will be according to the //UnicodeOutput and //UTF8Output option settings. (It's worked that way for the last several versions.)

As for reading input from a file, I think you need to handle that yourself. One way is to call MultiByteToWideChar() with CodePage set to CP_UTF8.
 
Truth be told, I hadn't even looked at the new SDK. Now that I do look, I see a couple of functions which I don't remember seeing before:

Code:
void WINAPI UnicodeToUTF8( LPCWSTR pszUnicode, char * pszUTF8, int nLength );
/* 
    Convert a Unicode string to UTF8
    nLength = maximum length of pszASCII
*/

void WINAPI UTF8ToUnicode( const char * pszUTF8, LPWSTR pszUnicode, int nLength );
/* 
    Convert a UTF8 string to Unicode
    nLength = maximum length of pszUnicode
*/

I don't know what they do that you can't do with WideCharToMultiByte() and MultiByteToWideChar(), though.
 

Similar threads

Back
Top