You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Justin Case <se...@yahoo.com> on 2009/09/01 18:19:23 UTC

umlauts in properties cannot be echoed

Hi all,

I have Ant 1.7.0 running on a GERMAN Windows XP. The thing has also filenames with UMLAUTS in the name. Now, I can't get even the below minimal example to correctly print the umlauts, regardless of the encoding I specify in the XML (which I think applies only to the XML parser anyway). 
What could I tell Ant so it works with those umlauts in its properties? Thank you very much in advance...
M

<?xml version="1.0" encoding="iso-8859-1" ?>
<project basedir="." default="blah" name="my task">
 <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
  <property environment="env" />
  <property name="mepath" value="." />
  <target name="blah" >
   <exec executable="cmd" outputproperty="dirList" dir="${mepath}">
    <arg line="/c dir" />
   </exec>
   <echo message="${dirList}" />
</project>



      

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


Re: umlauts in properties cannot be echoed

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-09-01, Justin Case <se...@yahoo.com> wrote:

> I have Ant 1.7.0 running on a GERMAN Windows XP. The thing has also
> filenames with UMLAUTS in the name. Now, I can't get even the below
> minimal example to correctly print the umlauts,

This is because cmd.exe uses a different encoding from the rest of your
OS.  If you redirect Ant's output to a file (using -logfile) does it
look correctly when opened with notepad?

> regardless of the encoding I specify in the XML (which I think applies
> only to the XML parser anyway).

This is true.

Stefan

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