Bare newlines problem

Paul van der Vlis paul at vandervlis.nl
Tue Apr 3 07:27:00 EDT 2007


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/



More information about the Info-cyrus mailing list