aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes XSLT Task in ant gives waring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "XSLT Task in ant gives waring "Warning: encoding "UTF-8" not supported, using UTF-8"" Watch "XSLT Task in ant gives waring "Warning: encoding "UTF-8" not supported, using UTF-8"" New topic
Author

XSLT Task in ant gives waring "Warning: encoding "UTF-8" not supported, using UTF-8"

Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
In my ant build process I use two kinds of xslt transform. One is the built in ant task and another one is a custom task which I programmed my self.
I use jdk / jre 1.6
and I use saxon9ee.jar for xslt processing
When I use the built in ant task as given below everything looks fine.


In my custom ant task, which also does an xslt transform.
I get the transformer factory instance from net.sf.saxon.TransformerFactoryImpl.TransformerFactoryImpl (in the saxon9ee.jar) as given below



But this gives me a warning "Warning: encoding "UTF-8" not supported, using UTF-8"

Do you have an idea why and how can it be avoided ?

I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

Well, in my case, it would be because I'd coded it as "UFT-8" (sic). My fingers don't always fire in the right order.

However, I find it interesting that the first item in the error is quoted ("UTF-8") and the second one is not (UTF-8).

I'm a big fan of putting quotes around values in error messages, BTW. Not only do they point out issues with things like trailing spaces, but messages like:

Error: cannot use class in this context.

waste a lot of time compared to:

Error: cannot use "class" in this context.

In cases where "class" is the name of a parameter.


Customer surveys are for companies who didn't pay proper attention to begin with.
Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
Thank You Tim
But please note that this is a warning which I get when I run my ant task and there is nothing like "UTF-8" I used in my custom ant Task
I thought This is coming from the TrasformerFactory class that is why I replaced the built in TrasformerFactory to the one from Saxon this worked well with the built in xslt task but not in my custom implementation.

Or
Could you tell me where can I see the the Java source code for the ant XSLT task.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Could you tell me where can I see the the Java source code for the ant XSLT task.

Looks like it is in src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java in the Ant source package.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSLT Task in ant gives waring "Warning: encoding "UTF-8" not supported, using UTF-8"