ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex_Ful...@lodestarcorp.com
Subject concat task with UTF8 files
Date Thu, 03 Apr 2003 15:44:08 GMT

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>&#239;</replacetoken>
</replace>
<replace file="${dir.build}/${rc.name}" encoding="UTF8" summary="true" >
      <replacetoken>&#187;</replacetoken>
</replace>
<replace file="${dir.build}/${rc.name}" encoding="UTF8" summary="true" >
      <replacetoken>&#191;</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.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Mime
View raw message