Problems with different line endings
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 12
- Joined: Mon Sep 15, 2003 9:17 pm
- Location: Germany
Problems with different line endings
Hello,
first, I can't find a "Bugs" forum. Then I also searched this board. And here's my problem:
I'm writing a lot of code (PHP) with Textpad. Normally, I only save files with PC line endings. But I happen to find my files with some additional empty lines when I re-open them. I'm absolutely sure, I didn't insert these lines, as I generally write quite clean styled code. When I save the file with Ctrl+S, I see it says "Unknown" line format. But it should be "PC". When I go to the Save As dialog, it displays "Leave unchanged" in this box. But it should be "PC". When I remove the spare lines and save explicitly as "PC", it works, when I re-open this file.
The error is not reproduceable, it happens every now and then. Only the lines I recently changed seem affected by this. Is there a bug in the way TP recognizes line endings? It would have to be a serious error in the program, I didn't use UNIX files for a long time now AFAIR.
first, I can't find a "Bugs" forum. Then I also searched this board. And here's my problem:
I'm writing a lot of code (PHP) with Textpad. Normally, I only save files with PC line endings. But I happen to find my files with some additional empty lines when I re-open them. I'm absolutely sure, I didn't insert these lines, as I generally write quite clean styled code. When I save the file with Ctrl+S, I see it says "Unknown" line format. But it should be "PC". When I go to the Save As dialog, it displays "Leave unchanged" in this box. But it should be "PC". When I remove the spare lines and save explicitly as "PC", it works, when I re-open this file.
The error is not reproduceable, it happens every now and then. Only the lines I recently changed seem affected by this. Is there a bug in the way TP recognizes line endings? It would have to be a serious error in the program, I didn't use UNIX files for a long time now AFAIR.
- Niels H. Veldhuijzen
- Posts: 15
- Joined: Mon Apr 19, 2004 12:12 pm
- Location: Zutphen, The Netherlands
- Contact:
Dear all,
this looks a bit like my problem, which I did not succeed in putting through to this forum. (How do you put a message on the forum?) In some of my newly keyed n files (default file format: PC), the line ending is LF/LF, instead of CR/LF. I never spotted it before Textpad 4.7.2, although I don't know if this version is to blame. If you have any idea about what's happening, please let us know.
this looks a bit like my problem, which I did not succeed in putting through to this forum. (How do you put a message on the forum?) In some of my newly keyed n files (default file format: PC), the line ending is LF/LF, instead of CR/LF. I never spotted it before Textpad 4.7.2, although I don't know if this version is to blame. If you have any idea about what's happening, please let us know.
Yours sincerely,
Niels H. Veldhuijzen
Zutphen, The Netherlands
Niels H. Veldhuijzen
Zutphen, The Netherlands
That's exactly what I'm seeing. Again, I've only noticed this with 4.7.2 but then, in the past I've mostly edited LF only files.
I am seeing odd line spacing in things I load back into TextPad, where CR/LF line endings seem to have been written as LF/LF by accident. The file at the time of editing was of type "PC" according to TextPad. The Save As file format is "No change". I'm using WinScite to view the line ending types in the file. Loading the "damaged" file back into TextPad shows double line spacing and a filetype that's become "Unknown" rather than "PC". Windows XP Pro, up to date patches, P4 2.8GHz no HT, 512MB RAM.
I'm presently working on a moderate sized source tree with a mixture of files with PC or Unix-style line endings. It appears that this problem has been "rotting" sources for some time and only came to light recently. It's causing us a great deal of headaches trying to fix things and get our CVS repository back into a sane state.
With no official acknowledgement of the fault - the two reports I'm replying to are from September last year and April this year, so it's been a while! - I think I'm going to be forced to drop TextPad and use another editor until a fix is made.
Is there an official place to send bug reports?
I am seeing odd line spacing in things I load back into TextPad, where CR/LF line endings seem to have been written as LF/LF by accident. The file at the time of editing was of type "PC" according to TextPad. The Save As file format is "No change". I'm using WinScite to view the line ending types in the file. Loading the "damaged" file back into TextPad shows double line spacing and a filetype that's become "Unknown" rather than "PC". Windows XP Pro, up to date patches, P4 2.8GHz no HT, 512MB RAM.
I'm presently working on a moderate sized source tree with a mixture of files with PC or Unix-style line endings. It appears that this problem has been "rotting" sources for some time and only came to light recently. It's causing us a great deal of headaches trying to fix things and get our CVS repository back into a sane state.
With no official acknowledgement of the fault - the two reports I'm replying to are from September last year and April this year, so it's been a while! - I think I'm going to be forced to drop TextPad and use another editor until a fix is made.
Is there an official place to send bug reports?
I'm having the same problem. The lines are not being terminated properly -- TextPad is apparently adding something to the file, forceing it to require conversion to DOS in UltraEdit, when it should be saving it in DOS format. It's adding extra <CR> to the <CR><LF> ending.
I have to dump TextPad now. I hate to, I love it, but work requires it.
I have to dump TextPad now. I hate to, I love it, but work requires it.
re: different line endings
I have the same problem with blank lines being inserted into text files that do not exist in notepad. The files themselves have been opened or saved in their lifetime on a unix machine, but the lines don't show up in notepad on a windows 2k or xp machine, only in textpad(other text editors too such as Edit Pad that I've tried--the added blank lines are there too).
Any ideas?
Any ideas?
If you have been affected by this problem, please will you try this latest build of TextPad:
http://www.textpad.com/download/beta/textpad473.zip
The zip file only contains textpad.exe, so backup your original version of that file and extract the new one to the same location.
Please post your results here, so we can be sure we've fixed it.
Thanks,
Keith MacDonald
Helios Software Solutions
http://www.textpad.com/download/beta/textpad473.zip
The zip file only contains textpad.exe, so backup your original version of that file and extract the new one to the same location.
Please post your results here, so we can be sure we've fixed it.
Thanks,
Keith MacDonald
Helios Software Solutions
Great news - thanks for supplying a fix! The trouble is, I found the fault to be intermittent and hard to duplicate. On the basis of the changes made for this test version of TextPad, do you have some idea of the circumstances that should cause it to generate incorrect line endings? I could then try than on my 4.7.2 installation to confirm that it does show the issues I've seen in the past, then try 4.7.3 and see if the problem goes away.bbadmin wrote:Please post your results here, so we can be sure we've fixed it.
Aside from that, only running 4.7.3 for a fairly long period of time will be able to show that the bug seems to be fixed, or at least shows up far less often.
The problem can only arise if an existing line is increased in length (or a new line typed), then split between its first and second characters. After that, the first of the split lines will be terminated with two linefeeds, if the original ended with return and linefeed. Unix and Mac files are unaffected.do you have some idea of the circumstances that should cause it to generate incorrect line endings?
Keith MacDonald
Helios Software Solutions
Ah. So amongst other things, suppose we want to reformat some code laid out like this:bbadmin wrote:The problem can only arise if an existing line is increased in length (or a new line typed), then split between its first and second characters (...)
Code: Select all
if (thing == 1)
{ do_something();
do_something_else();
}
Code: Select all
if (thing == 1)
{
do_something();
do_something_else();
}
Such a narrow set of actions that need to be taken to provoke the fault certainly explains why it seemed to be so intermittent.
I'll move to 4.7.3 full-time and keep an eye on line endings just in case, but it sounds like the fault is fixed - thanks again.
Thank you, Helios
First off, I love TextPad. I have been using it since version 3. I was using 4.7.2 since it came out and only just upgraded to the 4.7.3 version. For a lot of the web text file types that I edit for the websites I develop (e.g., PHP, HTML, CSS, JS) this problem was driving me NUTS.
Thanks so much for fixing this linefeeds issue !!
Thanks so much for fixing this linefeeds issue !!
- QKZ -