ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Garcés <carlos-gar...@usa.net>
Subject Re: Remove nulll chars from file
Date Thu, 08 Jul 2010 19:25:23 GMT
El 01/07/2010 16:44, Stefan Bodewig escribió:
> On 2010-07-01, Carlos Garcés wrote:
>
>    
>> There is other way to represent the null char on ant script?
>>      
> Unfortunately there isn't - and you can't even legally add a NUL
> character to any XML file either (for example&#0; would be invalid).
>
> A custom filter (maybe a scriptfilter using JavaScript) would work, but
> I'm afraid you can't configure any of the configured filters to skip
> NULs.
>
> It may be a nice enhancement if Ant's "backslash interpretation"
> understood Java's unicode escapes so you could write \u0000.
>
> Stefan
>
>    
The best option is change Ant to accept  Unicode escapes, but is out my 
scope.
The script filter just works, thanks for de tip.

<scriptfilter language="javascript">
	self.setToken(self.getToken().replace('\0', ''));
</scriptfilter>

Carlos




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


Mime
View raw message