mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 07:08:31 +00:00
[RTL][ADVAPI32_APITEST] RtlIsTextUnicode: Don't change weight unless lead-byte flag (#5396)
- Fix the garbled characters (a.k.a. mojibake) in some Japanese text files. - weight will remain 3 unless IS_TEXT_UNICODE_DBCS_LEADBYTE flag is set. - Strengthen advapi32_apitest IsTextUnicode testcase. CORE-19016
This commit is contained in:
parent
7fafeb6390
commit
17e9dcc922
2 changed files with 30 additions and 5 deletions
|
@ -1356,7 +1356,7 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
|
|||
}
|
||||
}
|
||||
|
||||
if (NlsMbCodePageTag)
|
||||
if (NlsMbCodePageTag && pf && (*pf & IS_TEXT_UNICODE_DBCS_LEADBYTE))
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
|
@ -1378,8 +1378,7 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
|
|||
else
|
||||
weight = 1;
|
||||
|
||||
if (pf && (*pf & IS_TEXT_UNICODE_DBCS_LEADBYTE))
|
||||
out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
|
||||
out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue