I parsed JSON data to a gridview which has utf-8 characters, but data in gridview doesn't show utf-8. I hardcoded titles of columns in gridview and it shows utf-8 characters. I added:
<system.web>
<globalization fileEncoding="utf-8" requestEncoding="utf-8"
responseEncoding="utf-8" culture="en-US"/>` and `<meta http-equiv="content-
type" content="text/html; charset=utf-8" />
But it isn't showing characters correctly.
This is my parser:
public static List<Currency> ParseCurrency()
{
using (WebClient webClient = new System.Net.WebClient())
{
WebClient client = new WebClient();
var json = client.DownloadString("http://api.hnb.hr/tecajn/v2");
List<Currency> currencies =
JsonConvert.DeserializeObject<List<Currency>>(json);
Console.WriteLine(currencies.Count);
return currencies;
}
}