From: Jacek Caban Subject: Re: [PATCH] mshtml: When creating new channel default to current locale charset. Message-Id: Date: Sun, 21 Jun 2020 20:38:11 +0200 In-Reply-To: <20200619111913.b69c04677c2a5ddce60da412@baikal.ru> References: <20200619111913.b69c04677c2a5ddce60da412@baikal.ru> Hi Dmitry, On 19/06/2020 05:19, Dmitry Timoshkov wrote: > @@ -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); That's not how other nsIChannel implementations work in Gecko. As far as I can see, we should provide a charset only when we know it and let the caller figure out the default. I'm afraid that your change could break charset auto detection. I don't know what's the exact problem you're trying to fix, but we maybe we don't set it in some case when we should? Looking at Gecko code, I just noticed that we should try to extract it from content type in SetContentType(), for example. Thanks, Jacek