Dean Meyer
asked on
How to get the web content with different encodings
I have this list of links (adList.Link) where the charset is either shift_jis or UTF-8. If I set the WebClient's encoding to UTF-8, the Japanese Characters are encrypted to those sites that has shift_jis as charsets and if I set it to shift_jis then the UTF-8's sites' japanese characters are then encrypted.
var address = adList.Link;
using (var w = new WebClient())
{
w.Encoding = Encoding.GetEncoding("shift_jis");
var json_data = w.DownloadString(address);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER