Hey, You should not enclose the name of the property in quotes (and use the $ prefix) when you actually want its value.
You'll want something like this: <if test="${string::contains(readLine,'failed')}"> <echo message="${readLine}"> </if> Hope this helps, Gert -----Original Message----- From: netvampire.tw [mailto:[EMAIL PROTECTED] Sent: donderdag 4 december 2008 9:53 To: nant-users@lists.sourceforge.net Subject: [NAnt-users] echo message encoding and string:contains problems Dears: I had problems using echo message when my message is non unicode. and when I use string compare function.here is my snippet. <foreach property="readLine" item="Line" in "test.txt"> <if test="${string::contains('${readLine}','failed')}"> <echo message="${readLine}"> </if> </foreach> 1.I can't get boolean is true even my source contains 'failed' if I get it from a file. 2.if I response echo message in console,I can't figure out my message when it is not English. I found a way to display normally,just need to convert my test.txt to utf-8. need your suggestions,thanks help. ______________________________________________________________________________________________________ 付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.13/1827 - Release Date: 12/3/2008 5:41 PM ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users