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.

Don

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.