Qian Hong : mshtml: Using UTF-8 as default charset in bind_mon_to_wstr.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Sep 22 15:01:13 CDT 2014
Module: wine
Branch: master
Commit: 2eeffe8acd829ebeb4bbabc6c7e1ebd0725e40ea
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2eeffe8acd829ebeb4bbabc6c7e1ebd0725e40ea
Author: Qian Hong <qhong at codeweavers.com>
Date: Sat Sep 20 00:48:00 2014 +0800
mshtml: Using UTF-8 as default charset in bind_mon_to_wstr.
---
dlls/mshtml/navigate.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index c29e211..195f82e 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -938,7 +938,6 @@ static const BSCallbackVtbl BufferBSCVtbl = {
HRESULT bind_mon_to_wstr(HTMLInnerWindow *window, IMoniker *mon, WCHAR **ret)
{
BufferBSC *bsc;
- int cp = CP_ACP;
WCHAR *text;
HRESULT hres;
@@ -981,19 +980,17 @@ HRESULT bind_mon_to_wstr(HTMLInnerWindow *window, IMoniker *mon, WCHAR **ret)
break;
case BOM_UTF8:
- cp = CP_UTF8;
- /* fallthrough */
default: {
DWORD len;
- len = MultiByteToWideChar(cp, 0, bsc->buf, bsc->bsc.readed, NULL, 0);
+ len = MultiByteToWideChar(CP_UTF8, 0, bsc->buf, bsc->bsc.readed, NULL, 0);
text = heap_alloc((len+1)*sizeof(WCHAR));
if(!text) {
hres = E_OUTOFMEMORY;
break;
}
- MultiByteToWideChar(cp, 0, bsc->buf, bsc->bsc.readed, text, len);
+ MultiByteToWideChar(CP_UTF8, 0, bsc->buf, bsc->bsc.readed, text, len);
text[len] = 0;
}
}
More information about the wine-cvs
mailing list