Page 1 of 1

Can't seem to get it setup to not add ^M line control

Posted: Tue Jun 05, 2007 8:24 pm
by Rediranch
I can't seem to find the right combination of options to set on a document class to not add ^M at the end of the lines.

I used to edit UNIX files just fine with the old version, pulling the data files through Hummingbird Neighborhood. However (latest Textpad version) now when I edit the UNIX files, I get the ^M at the end of the line, which of course UNIX doesnt like.

Using UNIX commands to strip the ^M after editing the files is not a good solution for me.

Thx

Using 5.03 32 bit version of Textpad.

Posted: Tue Jun 05, 2007 9:45 pm
by ben_josephs
TextPad will normally save an existing file with the line endings it found in it when it opened it. Use File | Save As... | File format: UNIX, and it should be OK afterwards.

You can find out what line endings a file has with View | Document Properties | Document | File type.

Posted: Wed Jun 06, 2007 1:12 pm
by Rediranch
I tried to see if that was the case, and using vi in Unix I removed the ^M line endings, then edited through Textpad.

It put them back in (went back in through vi and found them back in the file).

I cannot use SAVE AS feature when editing through Hummingbird Network. When you use that product it FTPs the file you are opening to your local PC, then you edit it, and when you save it it FTPs the changed file back to UNIX. You cannot do a SAVE AS and save it back to the UNIX machine you got it from.

I'm assuming there's some settings I'm missing that will allow me to do this again since i was able to edit through Hummingbird before, with the previous version of Textpad. Either that, or I have to d/l the old version and reinstall Textpad 4.

Posted: Wed Jun 06, 2007 2:31 pm
by ben_josephs
I've never seen TextPad put carriage returns into a file that didn't already have them, except when it's explicitly told to do that (with File | Save As...). I haven't seen a change in this behaviour in version 5.

Could it be that Hummingbird has been configured to add CRs when transferring files from Unix to Windows, but not to remove them when transferring the other way? I always leave line endings as they are when dealing with Unix files on Windows. It saves a lot of trouble! (In fact, I use Unix line endings in my Windows text files, too.)

Have a look at one of these files after you've transferred it to your Windows machine, before you've edited it with TextPad (for example, by opening it in TextPad in binary format).

Why can you not File | Save As one of these files over itself in the temporary local location that Hummingbird has created for it?

Posted: Wed Jun 06, 2007 3:44 pm
by Rediranch
Well, further testing shows that it's actually Hummingbird that's inserting the ^M's.

I dropped to DOS and FTPd a file to my local PC, edited it in Textpad, and FTP'd it back. No ^M's.

When I then take the same file and instead of FTP'ing it back via the DOS window, I instead drag and drop using Hummingbird, it inserts the ^M at the end of the lines.

Sorry for the confusion. Looks like I was fighting the wrong product. This new PC image they installed must have a setting somewhere in Hummingbird that I need to change.

:oops:

Posted: Wed Jun 06, 2007 6:44 pm
by Rediranch
Yup, was Hummingbird. Wrote them and got a patch back, and it works fine now.

Thx for your time.