kimrune Posted July 1, 2003 Posted July 1, 2003 Hey... Hope someone knows the answer for this :) I'm using this code to grab content from an URL. The problem is, when displaying the String s all the chars æ, ø, and å is not displayed right.. They come out as ? or x or some other cryptic characters... How can I display the characters correctly? This is the code: Dim wc As New WebClient Dim strArray As Array Dim s As String Dim b() As Byte b = wc.DownloadData(url) s = Encoding.ASCII.GetString(b) Would appreciate any help I can get :) Quote
Administrators PlausiblyDamp Posted July 1, 2003 Administrators Posted July 1, 2003 What character set is the webpage encoded in? you may want to try replacing the line s = Encoding.ASCII.GetString(b) with one of the following s = Encoding.Unicode.GetString or s = Encoding.UTF8.GetString Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.