Author: dchapyshev
Date: Wed Sep 28 21:44:01 2016
New Revision: 72845
URL:
http://svn.reactos.org/svn/reactos?rev=72845&view=rev
Log:
[SHLWAPI] Try to fix regression
Modified:
trunk/reactos/dll/win32/shlwapi/url.c
Modified: trunk/reactos/dll/win32/shlwapi/url.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Wed Sep 28 21:44:01 2016
@@ -1190,13 +1190,23 @@
if ((cur >= 0xd800 && cur <= 0xdfff) &&
(src[1] >= 0xdc00 && src[1] <= 0xdfff))
{
+#ifdef __REACTOS__
+ len = WideCharToMultiByte( CP_UTF8, 0, src, 2,
+ utf, sizeof(utf), NULL, NULL );
+#else
len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, src,
2,
utf, sizeof(utf), NULL, NULL );
+#endif
src++;
}
else
+#ifdef __REACTOS__
+ len = WideCharToMultiByte( CP_UTF8, 0, &cur, 1,
+ utf, sizeof(utf), NULL, NULL );
+#else
len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS,
&cur, 1,
utf, sizeof(utf), NULL, NULL );
+#endif
if (!len) {
utf[0] = 0xef;