mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[RTL]
- It is impossible to look for multi byte char in single byte table svn path=/trunk/; revision=72586
This commit is contained in:
parent
e8b1768ca7
commit
f57de63a06
1 changed files with 10 additions and 9 deletions
|
@ -515,7 +515,6 @@ RtlIsValidOemCharacter(IN PWCHAR Char)
|
|||
{
|
||||
WCHAR UnicodeChar;
|
||||
WCHAR OemChar;
|
||||
UCHAR Index;
|
||||
|
||||
/* If multi-byte code page present */
|
||||
if (NlsMbOemCodePageTag)
|
||||
|
@ -528,19 +527,21 @@ RtlIsValidOemCharacter(IN PWCHAR Char)
|
|||
if (NlsOemLeadByteInfo[HIBYTE(OemChar)])
|
||||
Offset = NlsOemLeadByteInfo[HIBYTE(OemChar)];
|
||||
|
||||
Index = LOBYTE(OemChar) + Offset;
|
||||
/* Receive Unicode character from the table */
|
||||
UnicodeChar = RtlUpcaseUnicodeChar(NlsOemToUnicodeTable[LOBYTE(OemChar) + Offset]);
|
||||
|
||||
/* Receive OEM character from the table */
|
||||
OemChar = NlsUnicodeToMbOemTable[UnicodeChar];
|
||||
}
|
||||
else
|
||||
{
|
||||
Index = NlsUnicodeToOemTable[*Char];
|
||||
/* Receive Unicode character from the table */
|
||||
UnicodeChar = RtlUpcaseUnicodeChar(NlsOemToUnicodeTable[(UCHAR)NlsUnicodeToOemTable[*Char]]);
|
||||
|
||||
/* Receive OEM character from the table */
|
||||
OemChar = NlsUnicodeToOemTable[UnicodeChar];
|
||||
}
|
||||
|
||||
/* Receive Unicode character from the table */
|
||||
UnicodeChar = RtlUpcaseUnicodeChar(NlsOemToUnicodeTable[Index]);
|
||||
|
||||
/* Receive OEM character from the table */
|
||||
OemChar = NlsUnicodeToOemTable[UnicodeChar];
|
||||
|
||||
/* Not valid character, failed */
|
||||
if (OemChar == NlsOemDefaultChar)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue