M
mike
I'm reading in a text file 602 bytes at a time, using the code below.
One of the lines has text that looks like this: "Cell#+9 and
more text here going to 602 characters for each line."
For some reason when this line is encoded the +9 is gone and
everything is moved to the left 2 bytes.
How can I get around this.
byte[] buff = new byte[602];
// Create the reader for data.
FileStream fs = new FileStream(filename, FileMode.Open,
FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
buff=r.ReadBytes(602);
line = System.Text.Encoding.ASCII.GetString(buff as
System.Byte[]);
I have also tried
System.Text.Encoding.UTF7.GetString(buff as System.Byte[]); with the
same result
One of the lines has text that looks like this: "Cell#+9 and
more text here going to 602 characters for each line."
For some reason when this line is encoded the +9 is gone and
everything is moved to the left 2 bytes.
How can I get around this.
byte[] buff = new byte[602];
// Create the reader for data.
FileStream fs = new FileStream(filename, FileMode.Open,
FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
buff=r.ReadBytes(602);
line = System.Text.Encoding.ASCII.GetString(buff as
System.Byte[]);
I have also tried
System.Text.Encoding.UTF7.GetString(buff as System.Byte[]); with the
same result