1

I have the fallowing problem:

I request a HTML-document which includes an array like this:

"entries":[{"element1":"Gem\u00fcse","element2":"zw\u00f6lf","element3":"n\u00e4chster"}]

by using the following code:

        WebRequest wRequest = WebRequest.Create(URL);
        wRequest.Method = WebRequestMethods.Http.Get;

        using (WebResponse wResponse = wRequest.GetResponse() as WebResponse)
        {
            using (Stream strm = wResponse.GetResponseStream())
            {
                using (StreamReader strmReader = new StreamReader(strm))
                {
                    string htmlDoc = strmReader.ReadToEnd();
                }
            }
        }

Now I want, that all umlaute appear like ä,ö,ü so that the string htmlDoc looks like this:

"entries":[{"element1":"Gemüse","element2":"zwölf","element3":"nächster"}]

How can I do this?

  • What about `string unescaped=Uri.UnescapeDataString(htmlDoc)`? – Pikoh Apr 17 '17 at 14:06
  • Welcome to StackOverflow. This question (*How do I translate "...\u00fc..." to "...ü..."*) has already been asked and answered here, so I have taken the liberty to close your question as a duplicate and link to the answer provided there. If you feel that this was a mistake and the other question does not answer your question, please say so. – Heinzi Apr 17 '17 at 14:17

0 Answers0