aspose file tools*
The moose likes Servlets and the fly likes Unicode characters - javax . xml . transform . Transformer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Unicode characters - javax . xml . transform . Transformer

Ashish Agrawal
Ranch Hand

Joined: Nov 02, 2003
Posts: 112
I am using javax.xml.transform.Transformer to convert a Xml String to HTML using a xsl file.
I am getting the following exception --
javax.xml.transform.TransformerException: Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).

The Xml string (packet) is dynamically generated inside a servlet. It has some Thai language data. I have specifed the encoding type as "UTF-8" for both...xml and xsl. I even tried it without any encoding type.
Can any body help me out?
-- Ashish Agrawal.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Yes, I am sure we can help. But I think the XML forum will get you better and faster answers.
I am going to move this thread to that forum.
Good Luck
Mark
Let me rephrase it. Actually you already have a thread for this question in the XML forum, which is the more appropriate forum. So, in that case, this thread is a duplicate thread. So I am just going to close this thread. Please try to refrain from cross-posting questions to multiple forums. Thanks
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unicode characters - javax . xml . transform . Transformer
 
Similar Threads
cant view xml using xsl.
how to fix the weird characters from displaying in xsl output?
Displaying Japanese characters using XSL
Convert special characters to readable ones
Unicode characters - javax . xml . transform . Transformer