Convert resources strings to OEM before printing them on console.
Fixes broken displays with special chars

svn path=/trunk/; revision=65763
This commit is contained in:
Pierre Schweitzer 2014-12-20 16:40:57 +00:00
parent b2b224b527
commit 0c35f7905b

View file

@ -26,11 +26,13 @@ BOOL bUseAscii = FALSE; //if this flag is true, ASCII characters will be used in
VOID PrintResourceString(INT resID, ...)
{
WCHAR tmpBuffer[STR_MAX];
CHAR tmpBufferA[STR_MAX];
va_list arg_ptr;
va_start(arg_ptr, resID);
LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, STR_MAX);
vfwprintf(stdout, tmpBuffer, arg_ptr);
CharToOemW(tmpBuffer, tmpBufferA);
vfprintf(stdout, tmpBufferA, arg_ptr);
va_end(arg_ptr);
}