I’m downloading a webpage, and then loading strings from the page into a WPF UI.
One string has an accented character: “Ãine”.
In the debugger, the string looks fine, but when added to a WPF ListBox, it appears like this: Ã[]ine, where [] is a single rectangular symbol.
When I copy the text from the debugger UI and paste it, a space appears after the Ã. This ‘space’ shows up as the rectangular symbol when displayed by WPF.
Does anyone know what’s going on?
The fix was to download the webpage like this:
instead of like this:
WebClient.DownloadStringwas unable to properly download the page and convert it to a string.