ASP madness: reading file line by line problems

I have set up a web site using ASP. The pages read the content (for the body text, sidebars, etc.) from separate text files. Each line of the text file then becomes a paragraph in the final page’s HTML (i.e., I wrap the text read from that line in <p> </p> tags, etc.). It’s all set up so that the content can be easily updated, even by idiots.

Unfortunately, I now seem to be one of the idiots.

The problem I’m having is this: The text (say for the body text file) is written and pre-formatted in word-processing apps or plaintext editors. Sometimes, it works fine. Other times, the lines don’t break (the ASP considers the text file to be one long line, despite the visible line breaks I can see in my plaintext editor). Usually, the word processors’ [paragraph] characters give me no breaks in the final, whereas if I go back in the plaintext editor and manually delete the line breaks and type in a [return], it comes out A-OK.

Now, I’m guessing there’s a difference between the kind of breaks the programs are encoding. But what are they (what kind is each program plugging in), and how can I see what they are? “Show invisibles” etc. isn’t working. Can I get a Mac- or web-based app that will show me the ASCII/UNICODE/etc. values for everything in my plaintext file?

Mac, huh?? I would have suggested textpad, but it doesn’t come for mac. :frowning:

I suspect that the files you’re having problems with are using line feeds only - the filesystemobject readline routine expects a carriagereturn-linefeed (Ascii 13, acii 10)

As a wild guess, try reading the file in ASP using readAll and then splitting it with split(strAll, vbLf) into an array. Then loop over the array, each element representing one ‘line’.

Sorry I couldn’t be any more helpful at the moment.