[xep-support] UTF data format

From: Duncan, David <David.Duncan@bskyb.com>
Date: Mon May 02 2005 - 05:55:54 PDT

Hi, I am having a bit of difficulty in rendering any documents with a particular character in the XSLFO. The accented A character throws the following exception when using CLISER to perform the PDF rendering, Invalid byte 2 of 2-byte UTF-8 sequence.java.io.UTFDataFormatException: Invalid byte 2 of 2-byte UTF-8 sequence. I have tried varies things such as specifying UTF-8 encoding when I am converting between streams and strings, e.g. fo.getBytes("UTF-8"). I have also tried some character conversions using code like (although I want to avoid this sort of thing for performance reasons), if (chVal > Byte.MAX_VALUE) { encodedData.append("&#x").append(Integer.toHexString(chVal)).append(";"); } else { encodedData.append(ch); } It seems that I can get the PDF to render by trying combinations of these methods, but the characters always appear strange. We have bullet points and pound/euro symbols that start appearing as question marks if I start playing around with encoding. Can someone provide any advice on what the best approach should be to solve this problem? Incase this is helpful, I have attached an XML, XSL and XSLFO file that is causing the problem. The particular line in the XSLFO is, <fo:block text-align="left">@K2ADD1:10 ?rd na Mara</fo:block> Im not sure if this is important but the Address field with the problematic character comes from the source XML file. Other special characters I use (like bullet points) seem to work fine, but are coded into the XSL template and not the XML. Maybe the XALAN transform is doing something strange? The attached XSLFO file is a direct print out after the XSL transform is done and the FO transferred to the CLISER service. Any advice would be appreciated. Thanks for you help, David D. -----Original Message----- From: owner-xep-support@renderx.com [mailto:owner-xep-support@renderx.com]On Behalf Of David Tolpin Sent: 02 May 2005 12:05 To: xep-support@renderx.com Subject: Fwd: [xep-support] Strange behaviour in XEP Assistant Hi Richard, my apologies for the wrong name in the e-mail I've just sent. David ------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html ----------------------------------------- Information in this email may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks.

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

Received on Mon May 2 06:46:22 2005

This archive was generated by hypermail 2.1.8 : Mon May 02 2005 - 06:46:24 PDT