I'm downloading a string via WebClient()
and I get a string with badly formed accents.
Example:
{"fÃddiesticks":{"id":4078584,"name":"FÃddIesticks","profileIconId":946,"summonerLevel":30,"revisionDate":1475092874000}}
I know that the string
I get is in UTF-8
, but I can not convert to the default format of C#
that I do not even know what it is.
Code:
private void buttonSummonerBrowse_Click(object sender, EventArgs e)
{
WebClient webClientSummonerInfo0 = new WebClient();
webClientSummonerInfo0.DownloadStringCompleted += new DownloadStringCompletedEventHandler(SummonerInfo0_DownloadStringCompleted);
webClientSummonerInfo0.DownloadStringAsync(new Uri("https://br.api.pvp.net/api/lol/" + comboBoxSummonerRegion.SelectedItem + "/v1.4/summoner/by-name/" + textBoxSummonerName.Text + "?api_key=" + __apiKey));
}
private void SummonerInfo0_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
MessageBox.Show(e.Result);
}