I am consuming data from a web service, and the data is going through a soap extension. Currently it has TextReader reader = new StreamReader(fr om) where from is a Stream. This works great for most values, but when I reach a à characters it shows as a question mark. I updated to StreamReader(fr om, System.Text.Enc oding.Default) and now the à shows correctly, but characters such as Japanese or Chinese or Unicode do not show correctly.
In php I have solved this issue using mbstring functions such as mb_detect_encod ing and mb_check_encodi ng.
The data has a UTF-8 header.
Is there a way that I can reliably detect what type of encoding to declare for the StreamReader so that the correct characters will always show?
Thanks for any info.
In php I have solved this issue using mbstring functions such as mb_detect_encod ing and mb_check_encodi ng.
The data has a UTF-8 header.
Is there a way that I can reliably detect what type of encoding to declare for the StreamReader so that the correct characters will always show?
Thanks for any info.
Comment