[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text/plain mail in DOS format files double spaced



--- Greg Matheson <lang@ms.chinmin.edu.tw> wrote:
> I'm running MHonArc on Windows and the HTML results for
> text/plain messages have an extra line in them, perhaps because
> they are DOS format. They look OK in vim and less, so presumably
> they are just ordinary <CR><LF> line endings.
...
> The only problem I will have with this if it works, is that it is
> a hack at the wrong level. I need to write a filter, is it? But
> this is not a MIME thing, I think.
> 
> If I decide to run MHonArc with my cygwin compiled perl with
> Unix-mode file endings, I still want the code to work. 

There is probably two potential culprits:

. Under cygwin, you have some mounts mounted in textmode.  This is bad.
  Check the all your mounts are in binmode.  If not, any cygwin-based
  compiled program that writes a line of text to a file, cygwin automatically
  addes a <CR> to get the <CR><LF> dos end-of-line format.

. With the Win32 version of Perl, extra <CR>s may be introduced since
  I think filehandles default to textmode and not binmode.

In the sample message page URLs you provided, if you look at the raw source,
extra <CR>s are getting added.  On many lines, there are 3 consectutive
<CR>s at the end of lines.

My hunch is you are mixing cyginw/unix-based tools with Win32 tools, and
the EOLs are gettings all screwed up.

If using cygwin and cygwin compiled programs, try sticking purely with
cygwin-based tools, including cygwin perl.  Also, make sure all mounts
are in binmode.  I have never seen a real need to have textmode mounts
with cygwin, and all they tend to do is cause problems like this.

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]