https://issues.apache.org/bugzilla/show_bug.cgi?id=46550

           Summary: Task "replace" breaks file
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The sample file uses charset UTF-8. This file contains some chars 'CYRILLIC
CAPITAL LETTER I'. Replace filter shouldn't replace this letter but replace
with nod UTF-8 character.

Script copies cyrillic.UTF-8.original.xml to cyrillic.UTF-8.copy-replace.xml
(use replace task) and cyryllic.UTF-8.copy-filter.xml (use copy task with
filterset).

Test platform: Windows, system encoding windows-1251.

========================== build.xml for test =============================
<project name="copyBug.cyrillic" default="copyBug-test" basedir=".">

        <property name="basename" value="cyrillic.UTF-8"/>
        <property name="original" value="${basename}.original.xml"/>
        <property name="copy.filter" value="${basename}.copy-filter.xml"/>
        <property name="copy.replace" value="${basename}.copy-replace.xml"/>

        <target name="copyBug-test">
                <copy file="${original}" overwrite="true"
tofile="${copy.replace}"/>
                <replace file="${copy.replace}">
                        <replacefilter token="@someTextForReplacement@"
value="new text"/>
                </replace>
                <copy file="${original}" overwrite="true"
tofile="${copy.filter}">
                        <filterset>
                                <filter token="someTextForReplacement"
value="new text too"/>
                        </filterset>
                </copy>
        </target>

</project>


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to