Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Bartender
Posts: 19449
88
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
A berm makes a great wind break. And Iwe all like to break wind once in a while. Like this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!