ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Reading properties
Date Tue, 10 Jan 2006 05:07:09 GMT
On Mon, 9 Jan 2006, shreedhar natarajan <shreedharn@ami.com> wrote:

> One of my property file has key/values such as
> 
> path=something\usb

<snip/>

> I understand that it interprets \u in usb as unicode char.

Yes.

> I tried to use a filter to change "\" to "\\"
> 
> <filter token="\" value="\\"/> <copy
> file="${build_dir}/myvalues.properties" filtering="true"
> tofile="${build_dir}/myvalues1.properties" overwrite="true"> </copy>
> 
> It does not seem to work. What could be the problem ?

That filtering doesn't work as you expect.  Have you checked that
myvalues1.properties has all the backslashes replaced?

filtering works on delimited token, which you don't have in your
properties file.  You want to use a <replace> task instead.

Stefan

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


Mime
View raw message