Reading a Webpage Source with Cyrillic Characters

  • Thread starter Thread starter memzback
  • Start date Start date
M

memzback

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
 
Back
Top