You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Antoine Levy-Lambert <le...@tiscali-dsl.de> on 2003/02/20 22:18:51 UTC
international encoding (hebrew) and property task
Is it possible to create property files which ant can read which are not in the standard ISO 8859 character set, but in UTF 8, and contain for instance hebrew characters ?
If it is possible, how ?
I have just been working on sending email in Hebrew from a German Win2K computer with the mail task, using a patch supplied by a Russian ant user.
I managed well as soon as I typed my hebrew text in the build.xml, where I had explicitly written encoding=utf8.
When I tried instead to get my hebrew message from a property file, I got garbage, and I have a suspicion that the property task does not process properly (or cannot process) files containing UTF8. (with the syntax <property file="hebrew.properties"/> for instance, where "hebrew.properties" contains properties like line1=some hebrew sentence in UTF8
Let me know what you think.
Antoine
Re: international encoding (hebrew) and property task
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 20 Feb 2003, Antoine Levy-Lambert <le...@tiscali-dsl.de>
wrote:
> When I tried instead to get my hebrew message from a property file,
> I got garbage, and I have a suspicion that the property task does
> not process properly (or cannot process) files containing
> UTF8.
<property> uses
FileInputStream fis = new FileInputStream(file);
try {
props.load(fis);
which would need to be modified if you want a different encoding than
the platform's default.
If you want to dive in and patch it, may I suggest to add the encoding
attribute to <loadproperties> instead and leave the poor overloaded
<property> task alone 8-)
Stefan