Hi,
I m trying to read a text file, make some changes and write to another file. But the problem is, when I create file like below;
...
Dim e1 As Encoding = Encoding.GetEncoding("ISO-8859-9")
'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("d:\DRAWPROGRAM\Draw_Program.txt", False, e1)
...
There are CRLF at the end of lines. Is there a way to replace those with LF?
I tried like below but nothings changed:
...
Const cr As String = vbCrLf
Const lf As String = vbLf
...
Dim str As String = Regex.Replace(replaced, cr, lf)
'Write a line of text.
objStreamWriter.WriteLine(str)
I m trying to read a text file, make some changes and write to another file. But the problem is, when I create file like below;
...
Dim e1 As Encoding = Encoding.GetEncoding("ISO-8859-9")
'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("d:\DRAWPROGRAM\Draw_Program.txt", False, e1)
...
There are CRLF at the end of lines. Is there a way to replace those with LF?
I tried like below but nothings changed:
...
Const cr As String = vbCrLf
Const lf As String = vbLf
...
Dim str As String = Regex.Replace(replaced, cr, lf)
'Write a line of text.
objStreamWriter.WriteLine(str)