Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 41286 invoked from network); 28 Nov 2005 07:40:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Nov 2005 07:40:50 -0000 Received: (qmail 34806 invoked by uid 500); 28 Nov 2005 07:40:48 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 34459 invoked by uid 500); 28 Nov 2005 07:40:47 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 34448 invoked by uid 99); 28 Nov 2005 07:40:46 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Nov 2005 23:40:46 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id 69680DE; Mon, 28 Nov 2005 08:40:25 +0100 (CET) From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 37660] New: - using replace with X-Bugzilla-Reason: AssignedTo Message-Id: <20051128074025.69680DE@ajax.apache.org> Date: Mon, 28 Nov 2005 08:40:25 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=37660 Summary: using replace with Product: Ant Version: 1.6.5 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: louguang@vip.sina.com Hello: Recently in my work, I needed to change all the �\n� to �\nSomeWords�. I wrote the build file as following: originalForReplaced.txt hello world note:between the hello and world is '\n' not '\r\n' But failed. I looked into the source code, discovered that the string to be replaced and to be replaced with have all been processed so that �\n� are replaced with �\r\n�. but the string contains the whole text is not processed. So if the lines of the text are terminated with �\n�, all the line breaks will not be replaced. Then I added the code of: newString = stringReplace(newString, "\r\n","\n", false); newString = stringReplace(newString, "\n", StringUtils.LINE_SEP, false); in org.apache.tools.ant.taskdefs.Replace.processFile the problem is resolved. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org