Solved

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

Posted on 2001-06-26
7
185 Views
Last Modified: 2010-04-09
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).

Thanks
0
Comment
Question by:jamaica
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6229093
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.

:o)

Ant
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6229101
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.

:o)

Ant
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6229237
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.

Cd&
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 50 total points
ID: 6229254
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.

Cd&
0
 

Author Comment

by:jamaica
ID: 6235787
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.
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 6246362
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....
0
 

Author Comment

by:jamaica
ID: 6260755
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.

-jamaica-
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now