Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Russian Letter encoding issue

$
0
0

Hello, I'm facing a encoding issue when using HttpClient request in my Android app.

HttpClient client = new HttpClient();
                Task<HttpResponseMessage> response = client.GetAsync(url);
                Stream responseStream = response.Result.Content.ReadAsStreamAsync().Result;              
                using (var reader = new StreamReader(responseStream, System.Text.Encoding.UTF8))
                {
                    content = reader.ReadToEnd();
                }
I need to retrieve html content from the requested url. I get it in my content variable, but Russian letters could be encoded properly and displayed wrong. Could you please assist me in this. Thank you very much!

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>