By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,642 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,642 IT Pros & Developers. It's quick & easy.

Reading a Webpage Source with Cyrillic Characters

P: 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.Downloa dData(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

Apr 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
MemzBack,

Have a look at these pages.

Encoding (GetEncoding)
http://msdn.microsoft.com/library/de...odingtopic.asp

General
http://www.microsoft.com/globaldev/r...ce/cphome.mspx

OS systems
http://www.microsoft.com/globaldev/r...ocversion.mspx

I hope this helps a little bit?

Cor
Apr 4 '06 #2

P: n/a
me******@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
Apr 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.