mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 11:00:55 +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
|
@ -515,7 +515,6 @@ RtlIsValidOemCharacter(IN PWCHAR Char)
|
||||||
{
|
{
|
||||||
WCHAR UnicodeChar;
|
WCHAR UnicodeChar;
|
||||||
WCHAR OemChar;
|
WCHAR OemChar;
|
||||||
UCHAR Index;
|
|
||||||
|
|
||||||
/* If multi-byte code page present */
|
/* If multi-byte code page present */
|
||||||
if (NlsMbOemCodePageTag)
|
if (NlsMbOemCodePageTag)
|
||||||
|
@ -528,19 +527,21 @@ RtlIsValidOemCharacter(IN PWCHAR Char)
|
||||||
if (NlsOemLeadByteInfo[HIBYTE(OemChar)])
|
if (NlsOemLeadByteInfo[HIBYTE(OemChar)])
|
||||||
Offset = 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
|
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 */
|
/* Not valid character, failed */
|
||||||
if (OemChar == NlsOemDefaultChar)
|
if (OemChar == NlsOemDefaultChar)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue