mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
shlwapi: Use the standard WideCharToMultiByte instead of wine_utf8_wcstombs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0301c09d3e
commit
262a41ca4a
1 changed files with 6 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue