ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarek Czekalski <>
Subject Re: Incorrect reading of property containing accented chars from by custom task
Date Sat, 21 Apr 2012 08:17:20 GMT

Maybe you don't comply with the rules java has for property files. These 
can be found in java language specifictaion, but also in Properties 
class javadoc:

the input/output stream is encoded in ISO 8859-1 character encoding. 
Characters that cannot be directly represented in this encoding can be 
written using Unicode escapes as defined in section 3.3 of The Java^(TM) 
Language Specification;


W dniu 04/21/2012 10:01 AM, Lokesh Jain pisze:
> Hi,
> I have a custom ant task which reads certain properties from 
> and exports applications based on that.
> <target name="exportSingleApp_internal" >
> <taskdef classname="" 
> name="exportApplication" classpathref="proj.lib"/>
> <exportApplication applicationID = "${APPLICATION_GUID}" 
> applicationVersion="${APPLICATION_VERSION}"
>                           exportLocation="${APPLICATION_EXPORT_DIR}"/>
> </target>
> The property APPLICATION_GUID contains some accented chars such as  
> "ÀÁÂ".
> Now, when i execute this task on a Windows box, it seems to be working 
> fine.
> But on a CentOS box, the same property is read by the task program 
> along with some junk unicode chars. Consequently, the strings do not 
> match which affects some of the internal logic of the ant task.
> Eg: If I set the APPLICATION_GUID property to HELLOÀÁÂ
> The java program of the task reads the property as 
> HELLOÃ\u0080Ã\u0081Ã\u0082
> The $LANG env var on CentOS box is set to en_US.UTF-8.
> I am not sure if this is an Ant issue. Any pointers would be helpful.
> Regards,
> Lokesh
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message