Ok, there is no documentation yet, but here is the task and the test, all neatly laid and commented out the way jedit does. Default encoding is locale. I dont guarantee the unit tests all work; the last one is giving me an NPE right now, but I am not going to worry about that till tomorrow am.
usage:
<loadfile property="testLoadAFileEnc"
srcFile="loadfile.xml"
encoding="ISO-8859-1"/>
-Steve
Literary side issue: where is the quote from? [Looking it up on google is
cheating]
LoadFile.java
Description: Binary data
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="loadfile-test" basedir="." default="testLoadAFile">
<!-- this is a latin one file containing the UKP � symbol -->
<target name="init">
</target>
<target name="testNoSourcefileDefined" depends="init">
<loadfile property="foo" />
</target>
<target name="testNoPropertyDefined"
depends="init">
<loadfile srcFile="somefile" />
</target>
<target name="testNoSourcefilefound"
depends="init">
<loadfile property="missing" srcFile="somefile" />
</target>
<target name="testLoadAFile"
depends="init">
<echo
message="What's it going to be then, eh?"
file="loadfile1.tmp"
/>
<loadfile property="testLoad" srcFile="loadfile1.tmp" />
<echo>${testLoad}</echo>
</target>
<target name="testLoadAFileEnc"
depends="init">
<loadfile property="testLoadAFileEnc"
srcFile="loadfile.xml"
encoding="ISO-8859-1"/>
</target>
<target name="cleanup">
<delete file="loadfile1.tmp"/>
</target>
</project>
LoadFileTest.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
