On Mon, 4 Oct 2004 08:32:36 +0200, "Stan Sainte-Rose"
<st**@cyber972.com> wrote:
Hi,
I need to read a kind of text file from vb.net
I do know how to read a simple file, but this one seems to have special
characters.
Some characters appears like squares when open this file with notepad.
When I read the file from vb, I just have the last square.
How to avoid this and remove all the squares ?
Thanks for your help
Stan
Are these squares fwhere you would expect the end f line to be? Or do
you know if the file was created on a Unix system?
IF this is a Unix sources file then it is probable that the squares
represent the LF (Line Feed) character (ASCII 10). Unix generated
these in addition to the DOS/Win CR character (ASCII 13). If you have
access to this system, or can contact the file originatior then get
him to pass it through the xx2dos (HP-UX) command to strip these LF's
out. Other Unix variants should have a similar command.
If it'd not a unix command, the substring out the character showing as
a square and find it's ASCII value, then dump all characters with that
code.
This may/may not be of help, sorry I can't supply any code snippets at
the moment as I am on my laptop not my dev machine.
Rob.B.