Code: Select all
'#define Unicode
#include "Windows.bi"
#include "crt.bi"
const szAppName = "Добро пожаловать"
printf( "[%s - printed with CRT printf]\n", szAppName) ' the \n escape gets happily ignored
Print ' just a CrLf
Print "[";szAppName;"] (this works if the file is saved with a Utf8 BOM)"
MessageBox(0, @szAppName, "A: Should be Russian, with @:", MB_OK)
MessageBox(0, szAppName, "A: Should be Russian, no @:", MB_OK)
MessageBoxW(0, @szAppName, "W: Should be Russian, with @:", MB_OK)
MessageBoxW(0, szAppName, "W: Should be Russian, no @:", MB_OK)
P.S.: I have not yet found a scenario where printf("Добро пожаловать\n") would not show garbage; in contrast, it works perfectly in Masm32:
Code: Select all
include \masm32\include\masm32rt.inc
.code
start:
cls
printf("Добро пожаловать\n")
printf("that was Hello World")
exit
end start
that was Hello World