WebClient.DownloadString() returns string with peculiar characters

 is the windows-1252 representation of the octets EF BB BF. That’s the UTF-8 byte-order marker, which implies that your remote web page is encoded in UTF-8 but you’re reading it as if it were windows-1252. According to the docs, WebClient.DownloadString uses Webclient.Encoding as its encoding when it converts the remote resource into a string. Set it to System.Text.Encoding.UTF8 and things should theoretically work.

Leave a Comment