mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 00:00:20 +00:00
[KERNEL32]
Use actual codepage numbers for ANSI and OEM codepages. CORE-7568 #resolve #comment Committed. svn path=/trunk/; revision=63641
This commit is contained in:
parent
6e592c35e9
commit
c19093060f
1 changed files with 13 additions and 5 deletions
|
@ -89,21 +89,22 @@ NlsInit(VOID)
|
|||
}
|
||||
|
||||
/* Setup ANSI code page. */
|
||||
AnsiCodePage.CodePage = CP_ACP;
|
||||
AnsiCodePage.SectionHandle = NULL;
|
||||
AnsiCodePage.SectionMapping = NtCurrentTeb()->ProcessEnvironmentBlock->AnsiCodePageData;
|
||||
|
||||
RtlInitCodePageTable((PUSHORT)AnsiCodePage.SectionMapping,
|
||||
&AnsiCodePage.CodePageTable);
|
||||
AnsiCodePage.CodePage = AnsiCodePage.CodePageTable.CodePage;
|
||||
|
||||
InsertTailList(&CodePageListHead, &AnsiCodePage.Entry);
|
||||
|
||||
/* Setup OEM code page. */
|
||||
OemCodePage.CodePage = CP_OEMCP;
|
||||
OemCodePage.SectionHandle = NULL;
|
||||
OemCodePage.SectionMapping = NtCurrentTeb()->ProcessEnvironmentBlock->OemCodePageData;
|
||||
|
||||
RtlInitCodePageTable((PUSHORT)OemCodePage.SectionMapping,
|
||||
&OemCodePage.CodePageTable);
|
||||
OemCodePage.CodePage = OemCodePage.CodePageTable.CodePage;
|
||||
InsertTailList(&CodePageListHead, &OemCodePage.Entry);
|
||||
|
||||
return TRUE;
|
||||
|
@ -199,8 +200,15 @@ IntGetCodePageEntry(UINT CodePage)
|
|||
WCHAR FileName[MAX_PATH + 1];
|
||||
UINT FileNamePos;
|
||||
PCODEPAGE_ENTRY CodePageEntry;
|
||||
|
||||
if (CodePage == CP_THREAD_ACP)
|
||||
if (CodePage == CP_ACP)
|
||||
{
|
||||
return &AnsiCodePage;
|
||||
}
|
||||
else if (CodePage == CP_OEMCP)
|
||||
{
|
||||
return &OemCodePage;
|
||||
}
|
||||
else if (CodePage == CP_THREAD_ACP)
|
||||
{
|
||||
if (!GetLocaleInfoW(GetThreadLocale(),
|
||||
LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
|
||||
|
@ -1816,7 +1824,7 @@ GetCPInfoExW(UINT CodePage,
|
|||
|
||||
lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage;
|
||||
lpCPInfoEx->UnicodeDefaultChar = CodePageEntry->CodePageTable.UniDefaultChar;
|
||||
return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
|
||||
return GetLocalisedText(CodePageEntry->CodePageTable.CodePage, lpCPInfoEx->CodePageName);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue