Author: dchapyshev
Date: Sun Aug 28 16:08:25 2016
New Revision: 72488
URL:
http://svn.reactos.org/svn/reactos?rev=72488&view=rev
Log:
[RTL]
- Implement IS_TEXT_UNICODE_DBCS_LEADBYTE flag
* Fixes 4 new tests in advapi32_apitest
Modified:
trunk/reactos/sdk/lib/rtl/unicode.c
Modified: trunk/reactos/sdk/lib/rtl/unicode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/unicode.c?rev=…
==============================================================================
--- trunk/reactos/sdk/lib/rtl/unicode.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/rtl/unicode.c [iso-8859-1] Sun Aug 28 16:08:25 2016
@@ -1307,11 +1307,6 @@
}
}
- if (lo_byte_diff < 127 && !hi_byte_diff)
- {
- out_flags |= IS_TEXT_UNICODE_ASCII16;
- }
-
if (NlsMbCodePageTag)
{
for (i = 0; i < len; i++)
@@ -1333,7 +1328,25 @@
weight = 2;
else
weight = 1;
- }
+
+ if (*pf && (*pf & IS_TEXT_UNICODE_DBCS_LEADBYTE))
+ out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
+ }
+ }
+
+ if (lo_byte_diff < 127 && !hi_byte_diff)
+ {
+ out_flags |= IS_TEXT_UNICODE_ASCII16;
+ }
+
+ if (hi_byte_diff && !lo_byte_diff)
+ {
+ out_flags |= IS_TEXT_UNICODE_REVERSE_ASCII16;
+ }
+
+ if ((weight * lo_byte_diff) < hi_byte_diff)
+ {
+ out_flags |= IS_TEXT_UNICODE_REVERSE_STATISTICS;
}
/* apply some statistical analysis */
@@ -1377,16 +1390,6 @@
out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS;
break;
}
- }
-
- if (hi_byte_diff && !lo_byte_diff)
- {
- out_flags |= IS_TEXT_UNICODE_REVERSE_ASCII16;
- }
-
- if ((weight * lo_byte_diff) < hi_byte_diff)
- {
- out_flags |= IS_TEXT_UNICODE_REVERSE_STATISTICS;
}
}