You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Al...@lodestarcorp.com on 2003/04/03 17:44:08 UTC
concat task with UTF8 files
Hi,
I've been trying to use the concat task on a UTF-8 encoded file and I
guess the header that describes the encoding is getting pushed into the
result file. I thought I might be able to strip the offending characters
out with a replace task, but that's not working either. I'm using Ant
1.5.2 on Win2K with the following:
<!-- Concat files -->
<concat destfile="${dir.build}/${rc.name}" encoding="UTF8">
<filelist dir="${dir.build}" files="${rc.top}, ${rc.LTMH}"/>
</concat>
<!-- Replace the offending characters -->
<replace file="${dir.build}/${rc.name}" encoding="UTF8" summary="true" >
<replacetoken>ï</replacetoken>
</replace>
<replace file="${dir.build}/${rc.name}" encoding="UTF8" summary="true" >
<replacetoken>»</replacetoken>
</replace>
<replace file="${dir.build}/${rc.name}" encoding="UTF8" summary="true" >
<replacetoken>¿</replacetoken>
</replace>
I don't really believe this is concat's fault, as the DOS >> command
returns exactly the same concatenation. I just wonder why replace didn't
remove the text I wanted...
Thanks,
Alex
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This e-mail message and any attachments are confidential and may be
privileged. If you are not the intended recipient, please notify LODESTAR
Corporation immediately -- by replying to this message or by sending an
e-mail to postmaster@LODESTARcorp.com -- and destroy all copies of this
message and any attachments. Thank you.
For more information about LODESTAR Corporation, please visit us at
http://www.Lodestarcorp.com.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++