Reputation: 719
There's a document I'm displaying in a web browser ActiveX control hosted in a C++ app. This document has a META tag that specifies incorrect charset, so the output is funny. I know the correct encoding and want to change it programmatically to fix that. But whatever I try, the encoding remains unchanged.
I alredy tried, in various combinations and flavors:
IHTMLDocument2::put_Charset
(after the document finished loading);IHTMLMetaElement
);The control demonstrates remarkable persistence in preserving the incorrect encoding. What are my other options? I can't manipulate the source of the document being loaded.
Upvotes: 1
Views: 1187
Reputation: 719
Here's what eventually worked:
In the handler of the "NavigateComplete2" browser event,
Modifying the order of these actions, or omitting a step, will render the entire operation void. MSHTML is picky.
Upvotes: 0