ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Christiansen" <Nathan_Christian...@tni.com>
Subject RE: Carriage-returns in files ends up as "0D 0D 0A"
Date Mon, 28 Jul 2003 14:57:41 GMT
I always thought it was MS-DOS compatible editors terminate text lines with 0x0D 0x0A, Unix/Linux
editors with 0x0A, and MacOS editors with 0x0D.

BTW, you can get this problem (0x0D 0x0D 0x0A line terminators) without ant's help.

If you use CVS, this problem can occur with the following steps:
1. Checkout (or update) a file on a Linux box.
2. Edit the file using a MS-DOS compatible editor.
3. Commit the changes using the Linux box.
4. Checkout (or update) the file on a Windows box.

Step 2 changes the 0x0A terminator to 0x0D 0x0A. During step 3 no line ending conversions
are preformed, therefore, the 0x0D 0x0A terminator is saved into the CVS repository (the CVS
repository is expecting 0x0A terminators). During step 4 line ending conversions are preformed
resulting in a 0x0D 0x0D 0x0A ending.


Fortunately the <fixcrlf ...> task detects this problem and corrects it properly.


-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com


-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Sunday, July 27, 2003 7:40 PM
To: Ant Users List
Subject: Re: Carriage-returns in files ends up as "0D 0D 0A"


The why could relate to the fact that most Windows Editors terminate their
lines with 0D0A
And most Unix editors terminate their lines with 0D


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message