From: Paul van der Vlis (no email)
Date: Tue Apr 03 2007 - 07:27:00 EDT
Hello,
When I move a message to another mailbox, I get a warning about bare
newlines. How can I remove these bare newlines?
It's a big message with foto's, 3.5 MB. I am not sure this warning is
correct.
I allready tried a perl-script of Joseph Brennan what I found in this
list, but it did not change the message (checked with diff).
--------------
while(<>) {
# The \000 character (NUL) is not allowed
if ($line =~ s/\000//g) {
print STDERR "WARNING: Removing NUL\n";
}
# Change CRLF or bare CR to LF
$endcr = $midcr = 0;
$endcr++ if ($line =~ s/\015$//g); # \n already there
$midcr++ if ($line =~ s/\015/\n/g); # add \n
if ($endcr || $midcr) {
print STDERR "WARNING: Correcting CR characters\n";
}
print;
}
---------------------
With regards,
Paul van der Vlis.
-- http://www.vandervlis.nl/ ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
|
|
|