java - How to prevent ant build changing national characters when replacing characters in xml -
the problem facing whenever try build app ant need change values in strings.xml. value parsing through replacefilter
swedish national characters. getting changed after buid done.
in build.xml write :
<replace file="res\values\strings.xml"> <replacefilter token="@app_name@" value="${application.name}" />
in properties file: ånimal
in strings.xml value <string name="app_name">@app_name@</string>
getting changed <string name="app_name">Ã¥nimal</string>
i've tried using utf-8 , iso-8859-1 in both build.xml , strings.xml got answers? please help.
the problem not in <replace>
task, in <property file="..."/>
. value first incorrectly translated.
use following instead:
<loadproperties srcfile="application.properties" encoding="utf-8"/>
Comments
Post a Comment