Commit 262a41ca authored by Alexandre Julliard's avatar Alexandre Julliard

shlwapi: Use the standard WideCharToMultiByte instead of wine_utf8_wcstombs.

parent 0301c09d
......@@ -1200,16 +1200,15 @@ HRESULT WINAPI UrlEscapeW(
if ((cur >= 0xd800 && cur <= 0xdfff) &&
(src[1] >= 0xdc00 && src[1] <= 0xdfff))
{
WCHAR sur[2];
sur[0] = cur;
sur[1] = *++src;
len = wine_utf8_wcstombs(WC_ERR_INVALID_CHARS, sur, 2, utf, sizeof(utf));
len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, src, 2,
utf, sizeof(utf), NULL, NULL );
src++;
}
else
len = wine_utf8_wcstombs(WC_ERR_INVALID_CHARS, &cur, 1, utf, sizeof(utf));
len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, &cur, 1,
utf, sizeof(utf), NULL, NULL );
if(len < 0) {
if (!len) {
utf[0] = 0xef;
utf[1] = 0xbf;
utf[2] = 0xbd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment