The textual data in my text files are wrapping around ...

For the life of me, I cannot get this straightened out ...

A web page with several text files -- click on a link to a text file, it opens the file in the browser screen and it's  wrapping the text around and wherever there's a paragraph, it puts a little black box ascii code.

I've seen this before and I somehow think it has to be with the helper application being set to open any text file in Notepad.  I've been to Folder View and set it to use Wordpad but that isn't helping me at all!  

If I do open the text files directly from my hard drive using Wordpad, it displays okay but if I open any text file from my hard drive using Notepad, it wraps around.

The funny thing is, the other webservers open text files linked in an html doc just perfect, no wrapping around whether it opens in the browser screen or uses its external application (notepad or wordpad).

Someone help me, I want to launch this web page but this little bit of mess, which is now a big headache is preventing me from sending it out.

I know this should be simplistic as I've seen it before but no matter what I do (that is going into File View and setting a helper application is not helping me out here).

Who is Participating?

Improve company productivity with a Business Account.Sign Up

COBOLdinosaurConnect With a Mentor Commented:
The fix is similar and labour intensive.  After saving it as text load it back into word pad and remove any remaning linefeed and fix anyformatting that got screwed up with tabs.

Then manually reformat, and save it as text again.

The way to avoid it in the first place is when you do cut and paste from rtf or doc, save as rtf and then reload and save as text.  I Wordpad as my primary editor for eveything and that seems to some the formatting problems most of the time.

Have you been editing the files on both a UNIX/Linux machine and a Windows machine?

I guess the answer is yes - because I've had this issue before.

Open file in Wordpad and save it (as plain text) - then don't edit the file on the UNIX box - see if that helps.


If that doesn't make any difference then I would suggest editing the file, delete each carriage return and put the carriage return in again - I have had some strange problems with "invisible" (formatting) characters before and that was the only way I could resolve them.


Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Even with unix/linux you can have a problem if you use Wordpad and cut and past into it from an rtf or doc, when you save as text, it will sometimes strip out all the linefeeds because of the other formatting codes.

jamaicaAuthor Commented:
I've been editing the files on UNIX machine.
I had these set of files on another unix machine and didn't end up in this line-feed problem.
I transferred the files from one unix box to another -- maybe that could be the reason why they came out with the line feed wrapping around.

I'll check into your suggestions and award points.

thanks for the quick responses.
You could also use ftp to send files back and forth.  ftp knows all about <CR><LF> versus <LF> versus <CR> formats and translates accordingly.

If all else fails, I'll convert the files for you using a C program....
jamaicaAuthor Commented:
I've decided to split the points between COBOLdinosaur and a.marsh.

Your answers are the same and actually what I had thought of as well.

a.marsh answered first but COBOLdinosaur put more perspective to the answer. Therefore, he's getting the 25 pt award here.

a.marsh, I will make another post, which only *YOU* must respond to as *ANSWER* and I can award your points.

Thank you both for being so timely with providing feedback. Much appreciated.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.