I make changes to the file, the "source" file is a text file, but from a UNIX system.
I use StreamReader"source" to read the file, then create and save the changes in StringBuilderwith AppendLine().
Then I create StreamWriter(setup with the same Encodingas StreamReader) and write the file.
Now, when I compare two files using WinMerge, it reports that carriage returns are different.
What should I do to ensure that carriage returns are the same for the type of file I'm editing?
It should also be noted that the files that need to be changed can come from any system , and not just from a UNIX system, they can be the same from a Windows system, so I want to insert these new lines with a carriage return of the same type as source file
Thanks so much for any answers.
:)
source
share