PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Reading a Webpage Source with Cyrillic Characters
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Reading a Webpage Source with Cyrillic Characters
![]() |
Reading a Webpage Source with Cyrillic Characters |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi all, And thanks for taking a look at my post.
I'm trying to input the source of a website into a string in Visual Basic 2005. Heres the code Public Function GetPageHTML(ByVal URL As String) As String ' Retrieves the HTML from the specified URL Dim objWC As New System.Net.WebClient() Return New System.Text.UTF8Encoding().GetString(objWC.DownloadData(URL)) End Function Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox2.AppendText(GetPageHTML("http://www.russiandvd.com/store/product.asp?sku=41383&genreid=")) End Sub It gets the source correctly, but does not display the actual russian chracters in the HTML code. I've tried changing the Encoding but to no avail. If someone can please offer some advice, I'd be very grateful. Thanks |
|
|
|
#2 |
|
Guest
Posts: n/a
|
MemzBack,
Have a look at these pages. Encoding (GetEncoding) http://msdn.microsoft.com/library/d...codingtopic.asp General http://www.microsoft.com/globaldev/...nce/cphome.mspx OS systems http://www.microsoft.com/globaldev/...locversion.mspx I hope this helps a little bit? Cor |
|
|
|
#3 |
|
Guest
Posts: n/a
|
memzback@gmail.com wrote:
<snip encoding woes) > TextBox2.AppendText(GetPageHTML("http://www.russiandvd.com/store/product.asp?sku=41383&genreid=")) The encoding/charset for that page is ISO-8859-5. Unless you switch to the English version, which is ISO-8859-1. Andrew |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

