Problems with Line breaks under Windows
Anthony E . Greene
agreene@pobox.com
Sun Feb 11 00:12:15 2001
On Sat, 10 Feb 2001 09:37:30 Timo Schulz wrote:
>That's not a GnuPG/Mailer related problem. Both OS's have different
>ways to mark their line endings. Linux uses a simple linefeed '\n'
>and W32 uses a carriage return '\r' and a linefeed'.
>
>When you open a W32 message with a Linux editor, the '\r\n' combination
>will be shown as ^M.
Actually, the linefeed is a known control character in Linux, so it is not
displayed. Ctrl-M (^M) is a carriage return. In fact, if *every* line has a
carriage return and linefeed, vi/vim would ignore both and note in the
status line that the file is in DOS format. But if some lines have both and
some only linefeeds, then the carriage returns will be displayed in vi/vim
as ^M (Ctrl-M). Some GNOME/Gtk editors will only show an extra space at the
end of the line. Each editor may handle this situation differently.
Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Chat: AOL/Yahoo: TonyG05 ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>