ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 46550] New: Task "replace" breaks file
Date Fri, 16 Jan 2009 16:34:59 GMT

           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

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

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"
                <replace file="${copy.replace}">
                        <replacefilter token="@someTextForReplacement@"
value="new text"/>
                <copy file="${original}" overwrite="true"
                                <filter token="someTextForReplacement"
value="new text too"/>


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message