Problems with notesstream

I have an agent to process some text I have e-mailed myself. The text is aligned in columns, so I have been using mid(x,col#,len) to get the data I need. The problem I’m running into is that it appears that some lines get corrupted or the unicode charset is causing problems. All lines look perfect on the web (these are html files that I have e-mailed as text files), and in the body of the note itself before being processed. They have 117 columns and the spacing is uniform. Columns with no data are blank which is why I can’t use a csv type of file. When processing the data, however I’m getting some lines with no spaces between fields, others with only 1 or 2 where there should be 10…

The following is a snippet from one of the e-mails (if you expand this window to the point where there are five total lines here it will make more sense).

10:30-11:00AM :16 1 34:08 5:13 0 :16 0 0 2 2:10 0 24.23 100.00 8.1 0

10:30-11:00AM 0 0 :00 0 0 0 0 0.00 8.1 0

10:30-11:00AM 0 0 :00 0 0 0 0 100.00 1.0 0

10:30-11:00AM 0 0 :00 0 0 0 0 0.00 8.1 0

10:30-11:00AM 6:02 1 8:33 14:13 0 6:02 1 0 3 :08 0 6.70 100.00 8.1 0

this is how I’m getting the info line by line:

Set rti=doc.Getfirstitem(“Body”)

info=rti.getunformattedtext

Set stream=sess.Createstream()

Call stream.writetext(info)

stream.position=0

Do Until stream.Iseos

	x=stream.Readtext(STMREAD_LINE,2)

            <process x>

loop

Subject: in example of table above

…pasting it here didn’t maintain the integrity of the table…