Question
I thought this was an
RCS problem (
RCSProblemsOnWindows), but I am not convinced now. The symptom is that when I put the following:
1
2
3
4
5
-- Main.MartinCleaver - 21 Feb 2001
On editing the page for the second time, this turns to:
1
2
3
4
5
-- Main.MartinCleaver - 21 Feb 2001
And the problem gets worse on subsequent edits.
.
- TWiki version: Dec 2000
- Web server: Apache
- Server OS: Windows NT4 SP6
--
MartinCleaver - 21 Feb 2001
I think it might be related to
KfmBrowserSupportForEditing
Answer
Okay! Fixed it! It is related to
KfmBrowserSupportForEditing
On Windows you don't want the extra LF on resubstitution. I haven't worked out why, it might be something to do with whether Binary mode has been specified on the handle that reads in the file. Anyhow this fudges away the problem - alter bin/save[.pl].
90c90,91
< $text =~ s/
/\r\n/go;
---
> # $text =~ s/
/\r\n/go; # removed \r\n MRJC for TWiki.Support.WhyDoLinesComeOutDoubleSpaced
> $text =~ s/
/\n/go;
--
MartinCleaver - 25 Feb 2001
Hmm. I think the files might have been marked as text or binary or something. Certain old files in my web continue to exhibit this behaviour, but none of the new files do!
--
MartinCleaver - 24 Feb 2001
We had the same problem and used the fix mentioned above.
In addition, to avoid the sporadic problem remaining with already existing files, we adapted the edit script as follows:
NOTE: please go to edit mode to prevent Twiki from reformatting the code example!
sub main
{
...
old: $text =~ s/&/&\;/go;
old: $text =~ s/<\;/go;
old: $text =~ s/>/>\;/go;
old: $text =~ s/\t/ /go;
new: #MCH Added following lines to remove carriage returns
new: $text =~ s/\\\n//go;
new: $text =~ s/\r//go;
...
}
--
MarkusCherdron - 01 Mar 2001
What I also did was go through wiki.pm and mark binmode on all the file handles.
--
MartinCleaver - 02 Mar 2001