[xep-support] UTF data format

Duncan, David David.Duncan at bskyb.com
Mon May 2 05:55:54 PDT 2005


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 at renderx.com
[mailto:owner-xep-support at renderx.com]On Behalf Of David Tolpin
Sent: 02 May 2005 12:05
To: xep-support at 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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/octet-stream
Size: 9304 bytes
Desc: not available
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20050502/c31773f5/attachment.obj>


More information about the Xep-support mailing list