Hi,
I have a simple desktop application project in C++ WINAPI using all the default settings provided by VS2019. It uses wcsncpy_s() to load a string variable of type wchar_t with a literal string and then textout() to write this string to the screen. Standard ASCII characters are fine, but I also want to display the character Omega which has the unicode code value of 3A9 which I enter as per the sample below. However, what actually appears is not this character, but something different. I have checked tha the project properties (Configuration Properties > Advanced > Character Set are set to Use Unicode Character Set. Needless to say I've spent considerable time researching this and trying out the various suggestions but no solution has turned up so far. Trying character codes at random, it seems that the compiler can generate characters outside the basic ASCII set, for example it is possible to get a 'a' + umlaut or something like that. I suspect compiler may be outputting UTF-8 character set. Does anyone have any suggestions please?
Example
wcsncpy_s(TargetString, MAX_LOADSTRING, L"\x039A", MAX_LOADSTRING); // MAX_LOADSTRING is declared as 100
Amongst many other things have also tried but without success.
wcsncpy_s(TargetString, MAX_LOADSTRING, L"\u039A", MAX_LOADSTRING); // MAX_LOADSTRING is declared as 100
Thanks