I am making uwp(Universal Windows Platform) application and want to deserialize this xml: http://radioa24.info/ramowka.php to object, but I got instead for scpecial characters as ł, ó some strange letters and special ones like: \n and \r: "Ä…"=>"ą" "ć"=>"ć" "Ä™"=>"ę" For example instead of Poniedziałek
i got PoniedziaÅ\u0082ek
My code:
var httpClient = new HttpClient(); var response = await httpClient.GetAsync(uri).AsTask(); response.EnsureSuccessStatusCode(); var result = await httpResponse.Content.ReadAsStringAsync();
I was trying to make some Encoding convertions but nothing worked out. How to solve it because later I want to got my object?
var reader = new XmlSerializer(typeof(Sources.Schedule)); using (var tr = new MemoryStream(Encoding.UTF8.GetBytes(resultString))) { Schedule = (Sources.Schedule)reader.Deserialize(res); }
No comments:
Post a Comment