Hi guys/gals,
I'm making changes to a file, the 'source' file is a plain text file, but from a UNIX system.
I'm using a StreamReader
to read the 'source' file, I then make and store the changes to a StringBuilder
using AppendLine()
.
I then create a StreamWriter
(set-up with the same Encoding
as the StreamReader
) and write the file.
Now when I compare the two files using WinMerge it reports that the carriage return characters are different.
What should I do to ensure that the carriage return characters are the same for the type of file that I am editing?
It should also be noted that the files that are to be modified could come from any system, not just from a UNIX system, they could equally be from a Windows system - so I want a way of inserting these new lines with the same type of carriage return as the original file
Thanks very much for any and all replies.
:)