DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7765>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7765 replace task does not accept encoding Summary: replace task does not accept encoding Product: Ant Version: 1.4.1 Platform: All OS/Version: Solaris Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The replace task does not take an encoding attribute. This is important, as now replace will open the file in the system default encoding, and also write it that way, which means character information may get lost. We created a variation on your replace-task where you can specify an optional encoding attribute. Code changed for this in Replace.java: Introduced private String encoding = null; Setter public void setEncoding(String encoding) { this.encoding = encoding; } And changed opening of streams at line 294: BufferedReader br; BufferedWriter bw; if (this.encoding == null) { br = new BufferedReader(new FileReader(src)); bw = new BufferedWriter(new FileWriter(temp)); } else { //System.out.println("Using encoding: " + this.encoding); br = new BufferedReader(new InputStreamReader(new FileInputStream(src), encoding)); bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(temp), encoding)); } No idea whether this also applies to other tasks. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>