[PATCH] mshtml: When creating new channel default to current locale charset.

Dmitry Timoshkov dmitry at baikal.ru
Thu Jun 18 22:19:13 CDT 2020


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/mshtml/nsio.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 7c8f029b4a..8cad9800a5 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -3372,6 +3372,7 @@ HRESULT create_doc_uri(IUri *iuri, nsWineURI **ret)
 static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
 {
     nsChannel *channel;
+    BSTR bstr;
 
     if(!ensure_uri(uri))
         return NS_ERROR_UNEXPECTED;
@@ -3385,6 +3386,11 @@ static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
     channel->nsIHttpChannelInternal_iface.lpVtbl = &nsHttpChannelInternalVtbl;
     channel->ref = 1;
     channel->request_method = METHOD_GET;
+
+    bstr = charset_string_from_cp(GetACP());
+    channel->charset = heap_strdupWtoA(bstr);
+    SysFreeString(bstr);
+
     list_init(&channel->response_headers);
     list_init(&channel->request_headers);
 
-- 
2.26.2




More information about the wine-devel mailing list