locked
Special characters not displaying correctly RRS feed

  • Question

  • User1656501981 posted

    I am using a webservice to get a list of places. The places (country, state, and city) are being returned via xml in utf-8 format. When I view the places, all of the special characters do not display correctly, e.g. umlauts, accents, etc. For example some German and south american cities.  How can I convert these strings to display correctly on the web using c#.   Encoding.Convert?  convert to byte array? decode?

    Tuesday, February 7, 2012 1:05 PM

Answers

  • User1656501981 posted

    I set the webclient encoding to UTF8, which fixed my issue.
    client.Encoding = System.Text.Encoding.UTF8;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 8, 2012 1:45 PM