ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Carriage-returns in files ends up as "0D 0D 0A"
Date Mon, 28 Jul 2003 01:40:02 GMT
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

The easiest solution is to write a Quick and Dirty Java app that reads each
line and scans for aberrant line endings (0D 0D 0A) and replace the normal
terminator (0D 0A)



----- Original Message -----
From: "Morten Mortensen" <>
To: "'Ant Users List'" <>
Sent: Sunday, July 27, 2003 12:34 PM
Subject: Carriage-returns in files ends up as "0D 0D 0A"

Hi All,

I experience problems with carriage-returns in files!

I want to read a multi-line text-file into a property with task "loadfile",
then replace this set of line into another multi-line-text-file at a certain
spot in the file using the task "replace". That is, I want to replace a
string within one file with the content of another file.

Within the final file, all carriage-returns between the lines from the first
file ends up as the sequence "0D, 0D, 0A" (have I seen by doing a binary
dump with a tool). So the problem is with the carriage-returns from the file
read by "loadfile".

As is, I can not use the generated file.

The file read by "loadfile" originally does contain "0D, 0A", not "0D, 0D,
0A" (binary dump again).
I am using "Apache Ant version 1.5.3 compiled on April 9 2003" on a Windows

Why is this?

Kind regards,
  Morten Sabroe Mortensen
  TietoEnator A/S, Ved Lunden 12, 8230 Åbyhøj, Danmark

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message