Webclient.DownloadString returns garbage

  • Thread starter Thread starter Yuriy Galanter
  • Start date Start date
Y

Yuriy Galanter

Hi,

I am using Webclient's method Downloadstring to get a static file from a
Webserver by its URL. If the file is in ANSI encoding - I get the string
with no problems. If the file is Unicode or UTF-8 - only some 2 scrambled
characters are downloaded. Any idea why this is happening? If I am opening
same file using system.io.file methods from a network share - I get the file
with no problems.

Thanks,

Yuriy.
 
Back
Top