I believe this should be working ok. I've just run a quick test and the output certainly looks valid from my perspective.
However I've Googled for Java/UTF-16LE issues and found some stuff which may suggest some problems in Java handling this as input. You may want to check this out. The XMLTask output encoding is handled by the underlying XML libraries (unless you specify a custom outputter). So the XMLTask code itself isn't concerned with output encodings, other than to indicate that required. Brian On Tue, October 2, 2007 21:56, Glodowski Jason wrote: > > I have a file that I am reading that is encoded in "UTF-16LE", when > xmltask updates the file with the encoding set to "UTF-16LE", it is > unreadable from the application that uses the file. I am able to set the > encoding to "UTF-16" and it is readable from the application that uses > the file. I would like to retain the "correct" encoding, so my question > is why is encoding="UTF-16LE" not working correctly in xmltask? > > Here is the ant code that does not work: > > <xmltask source="${dest.dir}\${filename}" dest="${dest.dir}\${filename}" > encoding="UTF-16LE"> > <replace path="/DOCUMENT/PATH/text()" withText="${dest.path}" /> > </xmltask> > > Thanks, > Jason > > > This e-mail is confidential. If you are not the intended recipient, you > must not disclose or use the information contained in it. If you have > received this e-mail in error, please tell us immediately by return e-mail > to [EMAIL PROTECTED] and delete the document. > > E-mails containing unprofessional, discourteous or offensive remarks > violate Sentry policy. You may report employee violations by forwarding > the message to [EMAIL PROTECTED] > > No recipient may use the information in this e-mail in violation of any > civil or criminal statute. Sentry disclaims all liability for any > unauthorized uses of this e-mail or its contents. > > This e-mail constitutes neither an offer nor an acceptance of any offer. > No contract may be entered into by a Sentry employee without express > approval from an authorized Sentry manager. > > Warning: Computer viruses can be transmitted via e-mail. Sentry accepts no > liability or responsibility for any damage caused by any virus transmitted > with this e-mail. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Xmltask-users mailing list > Xmltask-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xmltask-users > -- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users