Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Help with streamReader / Writer

Mar 5 2003 1:49 PM
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)