endline characters

Daniel Pittman daniel at rimspace.net
Sun Feb 11 04:25:06 UTC 2007


Maynard Wright <m-wright at eskimo.com> writes:

> In days of yore, Unix used a single line feed (0A hex) to terminate a
> line of text and DOS used a carriage return - line feed pair (OD hex
> 0A hex).  When moving files back and forth between the two systems, it
> was often necessary to convert the endline (sometimes called
> "newline") characters one way or the other.
>
> This situation seemed to prevail through RedHat 8 (LF) and W98SE
> (CR-LF).  In attempting to resolve some issues involved with porting
> code from Linux to Windows XP, I see that the situation seems to have
> been reversed.  

You are wrong.  Unix still uses LF line endings, Windows CR-LF.

> Although Kate under RH8 defaulted to LF endlines, Kate under Dapper
> defaults to CR-LF.  

That may be the case.

> Conversely, a file edited by Notepad under Windows XP and emailed to
> me (I don't have any OS other than Linux anymore) used only LF
> endlines.

Your mailer probably converted this; Notepad under XP does *not*
understand lines terminated only by LF -- it treats that as a single
embedded control character in one line.

> Although I haven't found a definitive commentary on this aspect of
> Windows, a Google search seems to indicate that up through W98SE,
> Microsoft OS used CR-LF, but that OS since that version, including XP,
> use LF as an endline character.
>
> Any thoughts or further information on this?

You are wrong, and the standard line endings have not changed.

I suspect your mailer converted the Windows created text file to the
local standard, and can't comment on the defaults of Kate.

Regards,
        Daniel
-- 
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707        email: contact at digital-infrastructure.com.au
                 http://digital-infrastructure.com.au/





More information about the kubuntu-users mailing list