The method below is extracting data from a JSON file, to populate a DropDownList.
public static List<Uf> GetAll()
{
var client = new WebClient();
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.Culture = new System.Globalization.CultureInfo("pt-BR");
var response = client.DownloadString(new Uri(HttpContext.Current.Server.MapPath("~/Scripts/uf.json")));
var lista = JsonConvert.DeserializeObject<List<Uf>>(response, settings);
return lista;
}
But when you return this to the browser, it displays accented characters with foreign codes.
How can I display the correct accented characters?