You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nat Gross <na...@verizon.net> on 2005/01/27 23:55:33 UTC

Echo: How to include a \t.

Hi;
How can I embed a \t within an echo string?
I tried to console and file, with and without message attribute, to no 
avail.
Thanks,
-nat

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Echo: How to include a \t.

Posted by Nat Gross <na...@verizon.net>.
Matt Benson wrote:

>--- Nat Gross <na...@verizon.net>
>wrote:
>
>  
>
>>Hi;
>>How can I embed a \t within an echo string?
>>I tried to console and file, with and without
>>message attribute, to no 
>>avail.
>>    
>>
>
>I believe this is an XML thing.  You might find an XML
>parser that would preserve a hard tab character in a
>buildfile, but as I understand it the tab character is
>not defined in XML so the behavior of (e.g. Xerces) is
>to interpret it as a space.  That what appears to be
>happening when I run:
>
><project>
>  <echo message="foo    bar" />
>  <!-- that was a tab between foo and bar
>       but my HTML form-based e-mail won't let
>       me do it ;) -->
></project>
>
>Can you just use several spaces?  You could even do:
>
><property name="tab" value="    " />
>and use ${tab} wherever you want...
>
>  
>
Neat idea. Thanks.
-nat

>-Matt
>
>  
>
>>Thanks,
>>-nat
>>    
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Echo: How to include a \t.

Posted by Matt Benson <gu...@yahoo.com>.
--- Nat Gross <na...@verizon.net>
wrote:

> Hi;
> How can I embed a \t within an echo string?
> I tried to console and file, with and without
> message attribute, to no 
> avail.

I believe this is an XML thing.  You might find an XML
parser that would preserve a hard tab character in a
buildfile, but as I understand it the tab character is
not defined in XML so the behavior of (e.g. Xerces) is
to interpret it as a space.  That what appears to be
happening when I run:

<project>
  <echo message="foo    bar" />
  <!-- that was a tab between foo and bar
       but my HTML form-based e-mail won't let
       me do it ;) -->
</project>

Can you just use several spaces?  You could even do:

<property name="tab" value="    " />
and use ${tab} wherever you want...

-Matt

> Thanks,
> -nat
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org