You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Bodewig <bo...@bost.de> on 2000/11/06 10:12:47 UTC

Re: 'filter' breaks up my images

>>>>> "AS" == Alberto Silva <al...@nmp.es> writes:

 AS> Is this a bug, or perhaps I am doing something wrong??

A documentation bug I'd say. filtering treats files as text files
(reads them line by line and writes them line by line). This will
corrupt binary data on platforms where text files and binary files are
different beasts (DOS based systems for example).

And I think you can easily imagine what happens if your images
accidently hold a byte sequence that matches a filter token (unlikely
but possible).

The workaround is to use two copy tasks, one with filtering="on" and
include patterns that exactly match the files you want to do filter
replacements on. The second one would have filtering="false" and
exclude those files.

Stefan

Re: 'filter' breaks up my images

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "AS" == Alberto Silva <al...@nmp.es> writes:

 AS> But you have said that this would happen in a DOS system...

I said "for example" 8-)

 AS> but I am using a Linux box... any idea why this happens in a
 AS> Linux box too?

I guess it is something like reading a CRLF sequence and writing it as
LF only. If you want to know for sure, you'd need to do a binary diff
of the files.

Stefan

Re: 'filter' breaks up my images

Posted by Alberto Silva <al...@nmp.es>.
Thanks Stefan!

But you have said that this would happen in a DOS system... but I am using a Linux box... any idea why this happens in a Linux box too?

Thanks!!

>>>>>> "AS" == Alberto Silva <al...@nmp.es> writes:
>
> AS> Is this a bug, or perhaps I am doing something wrong??
>
>A documentation bug I'd say. filtering treats files as text files
>(reads them line by line and writes them line by line). This will
>corrupt binary data on platforms where text files and binary files are
>different beasts (DOS based systems for example).
>



____________________________________________________________
Alberto Silva                 -  alberto@nmp.es  -     -o)
http://www.nmp.es             - +34 948 19 79 83 -      /\
GNU/Linux Registered and Supporter User   N.122522     _\_v
____________________________________________________________
Ordenagailu baten gauzarik garrantzitsuena aulkia eta
teklatuaren artean dago