ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60421] New: concat task: encoding problem with in-line string
Date Sat, 26 Nov 2016 09:36:54 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60421

            Bug ID: 60421
           Summary: concat task: encoding problem with in-line string
           Product: Ant
           Version: 1.9.7
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: sw.sch@gmx.de
  Target Milestone: ---

Concat task with in-line string may fail, e.g.:

<property name="fileContent" value="&#x00c4;&#x00d6;&#x00dc;
&#x00e4;&#x00f6;&#x00fc; &#x00df;"/>
<concat destfile="output-wrong.txt"
outputencoding="iso-8859-15">${fileContent}</concat>

The encoding of concat task (default: null) will not forwarded to embedded
StringResource (default encoding: UTF-8; formerly: null). It only works when
encoding attributes of Concat task and StringResource matches.

Workaround:

<property name="fileContent" value="&#x00c4;&#x00d6;&#x00dc;
&#x00e4;&#x00f6;&#x00fc; &#x00df;"/>
<concat destfile="output-fixed.txt" encoding="utf8"
outputencoding="iso-8859-15">
    <string encoding="utf8">${fileContent}</string>
</concat>

-> use explizit StringResource and define matching encoding values for <concat>
and <string>.

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