Hi group,

I'm using VB.net to convert an output file (text) from a Linux based program into a file that will easily read in Notepad. I found some code in VB.net to do this conversion for UNIX that works "OK" (meaning fair but not perfect). It looks like this:

txtLine = My.Computer.FileSystem.ReadAllText(RestranName)
' This begins to add the carriage returns in the appropriate places

txtLine = Replace(txtLine, vbLf, vbCrLf)
txtLine = Replace(txtLine, vbCr & vbCr, vbCr)
txtLine = Replace(txtLine, """", "")
' This writes the line to the file
My.Computer.FileSystem.WriteAllText(fileSave, txtLine, False)

The only issue (it's minor) is that it is adding a "ChrW(H2640)" character at the begining of each new page.

My question is: Would you know a better way to correct this so that it is formatted correctly and without the additional character?

In advance, thanks for your help.


2 Years
Discussion Span
Last Post by rubberman

There are simple tools to do this without having to resort to VB. Look at notepad++. It can easily convert Unix/Linux text files to Windows ones (converting the LF in the *nix files to CRLF for Windows), and vice-versa.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.