ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54606] New: unable to encode properly to UTF-8 when file.encoding=ANSI_X3.4-1968
Date Mon, 25 Feb 2013 02:12:55 GMT

            Bug ID: 54606
           Summary: unable to encode properly to UTF-8 when
           Product: Ant
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
    Classification: Unclassified

Looking at the "Core Trunk (Linux)" build configuration of Ant done on TeamCity
under 3 tests are
These tests are core/nested-text-test.xml (testNumericEntities) and
taskdefs/echo-test.xml (testUTF16Encoding and testUTF8Encoding).

testNumericEntities is echoing a string containing the a unlaut followed by the
trademark sign and asserting that the log does indeed contain these signs. The
string is entered as XML entities.

I noticed by looking in detail at the build log that the system property
file.encoding is set in this failing build to ANSI_X3.4-1968 which is a synonym
for ASCII.

The same problem is reproducible on MacOS using JDK 1.7 (build 1.7.0_04-ea-b17
most probably because this JDK 1.7 build also defaults to an ASCII encoding.

Ant did not have this bug back in Ant 1.7.1 and that the bug was introduced in
Ant 1.8.0.

Running the following snipped :
<target name="target2">
<delete file="abc.txt" quiet="true"/>
<echo file="abc.txt" encoding="UTF-8" message="&#xe4;&#169;">
is enough to illustrate the bug. Under Ant 1.7.1 the expected content ä© is
output in "abc.txt"

You are receiving this mail because:
You are the assignee for the bug.
View raw message