You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by 김동광 <el...@nhncorp.com> on 2007/11/09 08:03:53 UTC
Ant file.encoding problem.
Dear everyone.
I have been used ant 1.7.0 for running my program on linux (redhat. 2.6.9-42.0.10.ELsmp)
However, I have a some problem to process file.encoding.
My problem is..
A original file was written based on MS949 encoding. My program is working to read this file and write another file which was also MS949.
This compile was completed and I execute “java -Dfile.encoding=MS949 Test”. It was good work.
But, I wrote build.xml ;
------------------------------------------------
<target name="test"
description="classes">
<echo>ANT ENCODING : ${file.encoding}</echo>
<java classname="Test">
<sysproperty key="file.encoding" value="MS949"/>
<classpath location="." />
</java>
</target>
------------------------------------------------
# ant -Dfile.encoding=MS949 test
ANT ENCODING : MS949
This result was error……… output file’s data was broken such as “?????” .
I couldn’t understand and recognize why this problem happen… I have just thought a same result from java and ant.
Do you have any solution..???
Regards…
----------------------------------------------------------------
NHN Corporation
김 동 광 ( Kim DongKwang )
경기도 성남시 분당구 서현동266-1번지 분당퍼스트타워 13층
Office : 031-600-6079 , Mobile : 011-9353-3552
E-mail : elight@nhncorp.com
----------------------------------------------------------------
Re: Ant file.encoding problem.
Posted by Major shao <ma...@gmail.com>.
Hi, everyone
i am trying to upgrade the project from ant1.5.1 to ant1.7.0
it gave error build_config.xml:151: java.lang.ExceptionInInitializerError
the line 151 of that xml is a uptodate task. Any idea why i got the
error? Please kindly help.
Your reply is highly appreciated.
<target name="check.db.schema.up.to.date" >
<uptodate property="db.schema.up.to.date"
targetfile="${get.dbversion.build.dir}/src/dbinfo.properties" >
<srcfiles dir= "${db.root.dir}" >
<include name="DBInfo.java" />
<include name="GetDbInfo.java" />
</srcfiles>
</uptodate>
</target>
I tried to not to the ${get.dbversion.build.dir}, it still does not
work. Though it works if i use
<uptodate property="db.schema.up.to.date" srcfile="test1.java"
targetfile="dbinfo.properties" >
i cannot find out why.
And, it looks like i have more similar issues in the other following
lines in the xml. I cannot just change everything to not having the
path variable. Please help!
Thanks
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant file.encoding problem.
Posted by Peter Reilly <pe...@gmail.com>.
On Nov 9, 2007 7:03 AM, 김동광 <el...@nhncorp.com> wrote:
> Dear everyone.
>
>
>
> I have been used ant 1.7.0 for running my program on linux (redhat. 2.6.9-42.0.10.ELsmp)
>
> However, I have a some problem to process file.encoding.
>
>
>
> My problem is..
>
> A original file was written based on MS949 encoding. My program is working to read this file and write another file which was also MS949.
>
> This compile was completed and I execute "java -Dfile.encoding=MS949 Test". It was good work.
>
>
>
> But, I wrote build.xml ;
>
> ------------------------------------------------
>
> <target name="test"
>
> description="classes">
>
> <echo>ANT ENCODING : ${file.encoding}</echo>
>
> <java classname="Test">
>
> <sysproperty key="file.encoding" value="MS949"/>
>
> <classpath location="." />
>
> </java>
>
> </target>
I think that you may need set fork='true" (the ant manual says that
this is not needed in
general - but the "file.encoding" property may not be writtable in the
current VM).
Peter
>
> ------------------------------------------------
>
> # ant -Dfile.encoding=MS949 test
>
> ANT ENCODING : MS949
>
>
>
> This result was error……… output file's data was broken such as "?????" .
>
>
>
> I couldn't understand and recognize why this problem happen… I have just thought a same result from java and ant.
>
>
>
> Do you have any solution..???
>
>
>
> Regards…
>
>
>
> ----------------------------------------------------------------
>
> NHN Corporation
>
> 김 동 광 ( Kim DongKwang )
>
> 경기도 성남시 분당구 서현동266-1번지 분당퍼스트타워 13층
>
> Office : 031-600-6079 , Mobile : 011-9353-3552
>
> E-mail : elight@nhncorp.com
>
> ----------------------------------------------------------------
>
>
>
>