-
Apr 23rd, 2006, 05:49 AM
#1
Thread Starter
Junior Member
[SOLVED] Download webpages with strange (éçàè) characters using System.Net.WebClient
Last edited by stijn.adriaensens; Jun 8th, 2008 at 09:27 AM.
-
Apr 23rd, 2006, 01:04 PM
#2
Re: Download webpages with strange (éçàè) characters using System.Net.WebClient
try toying with the System.Text.Encoding of the byte() array you receive.
i added the exact html from your post to a local file, found that ASCII encoding returned mixed numbers & letters, UTF8 returned nothing, but Default returned the correct characters, like this ...
VB Code:
[COLOR=Blue]Dim[/COLOR] wc [COLOR=Blue]As New[/COLOR] WebClient
[COLOR=Blue]Dim[/COLOR] buffer [COLOR=Blue]As String[/COLOR] = System.Text.Encoding.Default.GetString(wc.DownloadData("c:\tmp.html"))
Console.WriteLine(buffer)
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Apr 23rd, 2006, 01:12 PM
#3
Thread Starter
Junior Member
Re: Download webpages with strange (éçàè) characters using System.Net.WebClient
Last edited by stijn.adriaensens; Jun 8th, 2008 at 09:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|