Re: Read File from vb.net
From: Rob Bradford (rob.bradford_at_lvirgin.net)
Date: 10/05/04
- Next message: Cor Ligthert: "Re: Newbie help needed"
- Previous message: Cor Ligthert: "Re: New to VB.Net.....Questions, Questions"
- In reply to: Stan Sainte-Rose: "Read File from vb.net"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 5 Oct 2004 06:41:42 +0000 (UTC)
On Mon, 4 Oct 2004 08:32:36 +0200, "Stan Sainte-Rose"
<stan@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.
- Next message: Cor Ligthert: "Re: Newbie help needed"
- Previous message: Cor Ligthert: "Re: New to VB.Net.....Questions, Questions"
- In reply to: Stan Sainte-Rose: "Read File from vb.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|