ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: echoproperties and umlauts > fixed
Date Fri, 30 Dec 2005 12:44:17 GMT

OK, finally i've found a working solution, without
hacking the echoproperties task.

If someone else runs into that ...

first step = dumping the properties to a tmpfile
<echoproperties prefix="dauftr" destfile="temmp.txt" />

second step = move the tmpfile to the final txtfile
using a filterchain

<move file="temmp.txt"
tofile="${txtpath}/${dirdate}/${projekt}_${timest}.txt">
<filterchain>
	<tokenfilter>
	<replacestring byline="true" from="\u00DF" to="ss"/>
	<replacestring byline="true" from="\u00C4" to="Ae"/>
	<replacestring byline="true" from="\u00E4" to="ae"/>
	<replacestring byline="true" from="\u00D6" to="Oe"/>
	<replacestring byline="true" from="\u00F6" to="oe"/>
	<replacestring byline="true" from="\u00DC" to="Ue"/>
	<replacestring byline="true" from="\u00FC" to="ue"/>
	<replacestring byline="true" from="\n" to="${line.separator}"/>
	</tokenfilter>
</filterchain> 

bye4now, Gilbert

-----Original Message-----
From: Jeffrey E Care [mailto:carej@us.ibm.com] 
Sent: Thursday, December 29, 2005 11:00 PM
To: Ant Users List
Subject: Re: echoproperties and umlauts

I don't know what it will do to the line breaks, but you could maybe run
a 
reverse native2ascii on the output file to "unescape" it.

JEC
-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)


Steve Loughran <stevel@apache.org> wrote on 12/29/2005 04:43:04 PM:

> Rebhan, Gilbert wrote:
> > addition
> > 
> > if i use =
> > 
> > <echoproperties prefix="bla" destfile="temp.txt" format="xml"/>
> > 
> > all works fine with linefeeds and umlauts,
> > but i need it as "normal" propertyfile
> > 
> 
> Ant uses the java APIs to export a "normal" property file, meaning one

> that is legal according to the java properties spec. The escaping and 
> line breaks are part of that legality. I dont see any obvious way to 
> change that behaviour.
> 
> -steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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


Mime
View raw message