ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: UTF-8 Encoding for LoadProperties
Date Mon, 24 Jul 2006 18:51:16 GMT
>From the JDK documentation (for example
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html)

<<<The load and store methods load and store properties in a simple
line-oriented format specified below. This format uses the ISO 8859-1
character encoding. Characters that cannot be directly represented in
this encoding can be written using Unicode escapes ; only a single 'u'
character is allowed in an escape sequence. The native2ascii tool can
be used to convert property files to and from other character
encodings.>>>

So I'm kinda surprised loadproperties offers an encoding attribute,
since the encoding of a properties file should be strictly ISO 8859-1
+ Unicode escapes.

Maybe it converts the specified encoding into "ISO 8859-1 + Unicode escapes"?!

--DD

On 7/24/06, Travis May <Travis.May@sas.com> wrote:
> I am struggling with some encoding issues.  I have:
>
>        <loadproperties srcFile="my.properties" encoding="UTF8"/>
>        <echo message="${message}" />
>
> In my.properties, message is set to "\u00F3"
>
> The output is the less than or equal to sign.
>
> This is the ASCII escape sequence for the less than or equal to sign.  Since that is
not an escape sequence in UTF8, shouldn't it output the literal "\u00F3"?  Any workarounds?
>
> Thanks,
> Travis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message