mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
At last unicode version of cmd are now output text with right code page
so charater on other langues like swedish, french, ... will display right now svn path=/trunk/; revision=15052
This commit is contained in:
parent
b62466eed1
commit
3f0b1b9276
1 changed files with 4 additions and 4 deletions
|
@ -105,7 +105,7 @@ VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
|||
ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL);
|
||||
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(CP_ACP, 0, pBuf, dwLength + 1, lpInput, dwLength + 1);
|
||||
MultiByteToWideChar( GetConsoleOutputCP(), 0, pBuf, dwLength + 1, lpInput, dwLength + 1);
|
||||
#endif
|
||||
p = lpInput;
|
||||
for (i = 0; i < dwRead; i++, p++)
|
||||
|
@ -133,7 +133,7 @@ static VOID ConChar(TCHAR c, DWORD nStdHandle)
|
|||
WCHAR ws[2];
|
||||
ws[0] = c;
|
||||
ws[1] = 0;
|
||||
WideCharToMultiByte(CP_ACP, 0, ws, 2, as, 2, NULL, NULL);
|
||||
WideCharToMultiByte( GetConsoleOutputCP(), 0, ws, 2, as, 2, NULL, NULL);
|
||||
cc = as[0];
|
||||
#else
|
||||
cc = c;
|
||||
|
@ -159,7 +159,7 @@ VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
|
|||
len = _tcslen(szText);
|
||||
#ifdef _UNICODE
|
||||
pBuf = malloc(len + 1);
|
||||
len = WideCharToMultiByte(CP_ACP, 0, szText, len + 1, pBuf, len + 1, NULL, NULL) - 1;
|
||||
len = WideCharToMultiByte( GetConsoleOutputCP(), 0, szText, len + 1, pBuf, len + 1, NULL, NULL) - 1;
|
||||
#else
|
||||
pBuf = szText;
|
||||
#endif
|
||||
|
@ -194,7 +194,7 @@ VOID ConPrintf(LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
|
|||
len = _vstprintf (szOut, szFormat, arg_ptr);
|
||||
#ifdef _UNICODE
|
||||
pBuf = malloc(len + 1);
|
||||
len = WideCharToMultiByte(CP_ACP, 0, szOut, len + 1, pBuf, len + 1, NULL, NULL) - 1;
|
||||
len = WideCharToMultiByte( GetConsoleOutputCP(), 0, szOut, len + 1, pBuf, len + 1, NULL, NULL) - 1;
|
||||
#else
|
||||
pBuf = szOut;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue