Problem with encoding using IPersistStreamInit to load HTML
- From: "Michael Baumgaertner" <michael_baumgaertner@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 07:37:49 +0200
Hi,
I'm using IPersistStreamInit to load a
HTML content into the webcontrol as described
in:
http://msdn.microsoft.com/workshop/browser/webbrowser/tutorials/webocstream.
asp
My problem is, that the encoding doesn't seem to
work correctly.
See following example HTML:
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<title>Test</title>
</head>
<body>
2 ?l.
</body>
</html>
Using IPersistStreamInit to load HTML string to
the webcontrol shows 2 wrong chars instead of ?.
If I load this HTML from file the contents
is shown properly.
If I query charset property from appropriate
IHTMLDocument2, I get "unicode" for loading
HTML from file.
In case loading from stream I get "windows-1252"
and even switching the charset afterwards to
"utf-16" doesn't work.
Does anybody know, how to deal with that?
Thanks & best regards
Michael
.
- Follow-Ups:
- Re: Problem with encoding using IPersistStreamInit to load HTML
- From: Igor Tandetnik
- Re: Problem with encoding using IPersistStreamInit to load HTML
- From: Michael Baumgaertner
- Re: Problem with encoding using IPersistStreamInit to load HTML
- Prev by Date: what's the shortest program to retrieve a URL page
- Next by Date: Re: Problem with encoding using IPersistStreamInit to load HTML
- Previous by thread: what's the shortest program to retrieve a URL page
- Next by thread: Re: Problem with encoding using IPersistStreamInit to load HTML
- Index(es):
Relevant Pages
|
|