Hi @Peter_1985 ,
If inp2.txt
was originally created with a different encoding (e.g., ANSI or UTF-8), then opening it with Encoding.Unicode
could misinterpret the characters.
Try using using (StreamReader sr = new StreamReader(@"z:/inp2.txt", true))
to auto-detect encoding.