1
I’m downloading a string via WebClient()
and I get a string with the badly formed accents.
Example:
{"fÃddiesticks":{"id":4078584,"name":"FÃddIesticks","profileIconId":946,"summonerLevel":30,"revisionDate":1475092874000}}
I know that the string
that I get is in UTF-8
, but I am unable to convert to the standard format of C#
I don’t 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);
}
you set to receive in UTF-8? How is your code!
– novic
On the site, the information is in UTF-8, as soon as I get, I show her in a Messagebox.Show()
– Ícaro Dantas
I made an answer see if it works!
– novic