• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Saloon Keeper
Posts: 25650
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic