1
Answer

Help with streamReader / Writer

Administrator

Administrator

21y
1.4k
1
I've got a need to read and write back out a file that may contain unusual characters, like "Frères" and others. When I use the following StreamReader(FileIn) the string == "Frres" StreamReader(FileIn,System.Text.Encoding.ASCII) the string == "Fr?res" StreamReader(FileIn,System.Text.Encoding.UTF7 the string in c# is correct, but in the file, it has "Fr+AOg-res") when using StreamWriter(FileOut,false,System.Text.Encoding.UTF7) to outupt the string. How do I read it in, and write it back out without changing the character or string? Thanks for any help. Dan
Answers (1)