Author: hbelusca
Date: Mon Apr 17 23:31:48 2017
New Revision: 74368
URL:
http://svn.reactos.org/svn/reactos?rev=74368&view=rev
Log:
[CONCFG]: Addendum for r74366: Initialize the console settings information codepage with
the current OEM codepage, and read the optional console "CodePage" DWORD
registry setting.
CORE-12451
Modified:
trunk/reactos/win32ss/user/winsrv/concfg/settings.c
Modified: trunk/reactos/win32ss/user/winsrv/concfg/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/concfg…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/concfg/settings.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/concfg/settings.c [iso-8859-1] Mon Apr 17 23:31:48
2017
@@ -19,6 +19,7 @@
#include <winbase.h>
#include <wingdi.h> // For LF_FACESIZE
#include <wincon.h>
+#include <winnls.h>
#include <winreg.h>
// #include <winuser.h>
// #include <imm.h>
@@ -254,7 +255,13 @@
Success = TRUE;
}
}
- if (!wcscmp(szValueName, L"FaceName"))
+ if (!wcscmp(szValueName, L"CodePage"))
+ {
+ if (IsValidCodePage(Value))
+ ConsoleInfo->CodePage = Value;
+ Success = TRUE;
+ }
+ else if (!wcscmp(szValueName, L"FaceName"))
{
wcsncpy(ConsoleInfo->FaceName, szValue, LF_FACESIZE);
ConsoleInfo->FaceName[LF_FACESIZE - 1] = UNICODE_NULL;
@@ -385,6 +392,7 @@
SetConsoleSetting(szValueName, REG_DWORD, sizeof(DWORD),
&ConsoleInfo->ColorTable[i], s_Colors[i]);
}
+ SetConsoleSetting(L"CodePage", REG_DWORD, sizeof(DWORD),
&ConsoleInfo->CodePage, CP_ACP /* CP_OEMCP */);
SetConsoleSetting(L"FaceName", REG_SZ, (wcslen(ConsoleInfo->FaceName) +
1) * sizeof(WCHAR), ConsoleInfo->FaceName, UNICODE_NULL); // wcsnlen
SetConsoleSetting(L"FontFamily", REG_DWORD, sizeof(DWORD),
&ConsoleInfo->FontFamily, FF_DONTCARE);
@@ -487,7 +495,7 @@
RtlCopyMemory(ConsoleInfo->ColorTable, s_Colors, sizeof(s_Colors));
- ConsoleInfo->CodePage = 0;
+ ConsoleInfo->CodePage = GetOEMCP();
}
VOID