Ok, here's the deal. The properties file is generated in ISO8859-1 encoding but(and this is what I didn't realise :-[ ) when I edit the file to put the APPLICATION_GUID as HELLOÀÁÀ, both vim and gedit convert the file into UTF-8. I used iconv to reconvert the file into ISO8859-1 and now it seems to be working. However, when I use Firefox to view the same file, it shows the encoding as KOI8-R :-\ . This probably speaks more about Mozilla's unreliability. Anyways, thanks for your assistance. It was highly appreciated. -Lokesh On 4/23/2012 9:33 PM, Stefan Bodewig wrote: > On 2012-04-23, Lokesh Jain wrote: > >> On 4/23/2012 1:53 PM, Stefan Bodewig wrote: >>> On 2012-04-21, Lokesh Jain wrote: >>>> 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. >>> What is "the task programm"? And how does it read the properties? >>> Maybe this one is expecting a different encoding than they have been >>> written with? >> I apologize for not being clear earlier. The task program refers to >> the java class used as the custom ant task. The property file is being >> read using Ant's built-in property task. What I meant to say was that >> the java custom task class field corresponding to ${APPLICATION_GUID} >> property had junk/incorrect chars for its value. >>> Does Ant's built-in property task (maybe using a prefix) work? >>> Something like >>> >>> ${foo.APPLICATION_GUID} >> I am afraid echoing is also returning the same junk/incorrect chars. > In that case build.properties most likely is not ISO-8859-1 encoded, no > matter what your Firefox says 8-) > > Can you perform a binary diff of the Windows and Linux generated files? > > If the file happens to use the platform's native encoding and you cannot > change the code that generates it, you can use Ant's copy task with an > outputencoding of ISO-8859-1 to re-code it. > > Maybe you should try (untested) > > outputencoding="ISO8851-1" filtering="true"/> > > ${foo.APPLICATION_GUID} > > to verify whether it is an encoding issue. > > Stefan > > --------------------------------------------------------------------- > 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