Am 2007-05-07 17:59:43, schrieb Ray Van Dolson: > I occasionally get emails generated from a web application here at work > that uses DOS/Windows newlines instead of Unix ones. All the text > shows up as one large line interspersed with ^M^M's. I'd like to > figure out a good way to: > > 1. Correct this in the pager view of the message. > 2. Correct this prior to the message being passed to my editor (vim) > for quoting. > > Currently I am resolving 1 by using the following message-hook: > > message-hook '~f ChangeControl.System@xxxxxxxx' 'set display_filter="sed -f > ~/bin/fix_m.sed"' Why not use: set display_filter="/usr/bin/dos2unix" > Where fix_m.sed strips out the ^M's and replaces them with my preferred > newlines. > > However, if I hit reply to this message, everything shows up in vim in > the original format -- ie with the ^M's all intact and everything on > one line. > > I can correct this from wtihin vim, but I'd prefer it all be automated. How do you get your E-Mails? Do you use "procmail"? Since I am on mailinglists which support Linux AND WINDOWS, I get this ^M regulary... ...and use: #################################################################### # FLT_dos_coded #################################################################### :0 fw * ^1^ \r\n * ? which dos2unix >/dev/null 2>&1 |/usr/bin/dos2unix Greetings Michelle Konzack Systemadministrator Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ ##################### Debian GNU/Linux Consultant ##################### Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSN LinuxMichi 0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment:
signature.pgp
Description: Digital signature