I am updating a legacy VB6 application that reads a text file line by line, and a different developer has updated the program that writes this text file, so now instead of reading one line, the legacy program reads the entire file. Theoretically we should be able to drop the files in the same program without changes, but this not recognizing line ends makes our simple legacy parser not work.
I checked and there is still a newline \n char written at the end of each line. I figure that he must be using a different encoding type or something where the readline does not recognize the end of the line in the new files - no problem with textpad and notepad putting in the new line though. The code fragment attached shows the readline used.
I tested with an older file, no problem, reads just one line fine, but a newer file created with the new app (which is simply a different version of Director with Flash embedded instead of pure director and no Flash) reads the whole file, which is bad as the VB6 program parses and uses each line before the next one is to be read.
The "lots of work" solution (some of which is political) is to have him write a stop char of some type at the end of each line, then split from there, hence not maxing points here at EE, but I'd like to know what is going on and solve it at my end if possible.
I've stripped out the personal data on a couple of files, an old one that works and a new one with just test info in it, and would appreciate any suggestions on how to tell what is going on.
(in sample ts is a textstream object)
Set ts = filPostData.OpenAsTextStream
' read the first line
strData = ts.ReadLine