Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IE object and encoding
Message
From
05/07/2004 18:11:43
Fabian Belo
Independent Developer
Argentina
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00920838
Message ID:
00920841
Views:
25
>I need to get the contents of the document on the Web page containing not English characters, say www.foxclub.ru. The page appears encoding in the Cyrillic.
>
>oIE=CreateObject("InternetExplorer.Application")
>oIE.Navigate(“www.foxclub.ru”)
>oIE.visible=.t.
>
>? oie.Document.body.innertext
>*or
>* strtofile(oie.Document.body.innertext,”c:\txt.txt”)
>
>The problem is that I am getting “????” instead of the proper characters. Using outertext, or innerhtml, or outerhtml does not help either.
>
>What I noted however is that if I go to View-->Encoding and manually change the encoding from Cyrillic to Western European, then I can get the proper text.
>
>So my question is whether it is possible to set encoding automatically from, say, ie object?
>Or perhaps anybody has the better idea how to resolve the problem?
>
>Thanks in advance

Hi Yuri;

Saving it as HTML file it will keep everything:
Declare Long URLDownloadToFile in "urlmon";
Long pCaller,;
String szURL,;
String szFileName,;
Long dwReserved,;
Long lpfnCB
 
url="http://www.foxclub.ru"
localfilename="c:/PaginaActualizada.html"
ngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) 
? ngRetVal
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform