I parse XML file. And I need to read russian letters.
But none of supported encodings(BigEndian,UTF8,Unicode) can do it.
FileStream f = new FileStream(filename, FileMode.Open);
StreamReader s = new StreamReader(f, Encoding.?);
What to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use an encoding that matches the file you are trying to parse. If the encoding is not one of the ones natively supported by Silverlight, you will have to supply your own sub-class of System.Text.Encoding to handle the file; it must convert the bytes in the file into the correct Unicode characters. If you identify the standard name for your encoding, you might do a search and find an implementation already exists; otherwise, you must write your own.