On Wed, 2005-11-23 at 11:52 +0000, Niven, Leona (SPUK) wrote:
>
> I was hoping you may be able to shed some light on a problem we are
> experiencing in production when using the afp renderer to convert
> xml:fo from web based application forms to afp print stream.
>
> Our convertxml.bat unix script which runs afp renderer is failing with
> the following error
>
> Wed Nov 23 11:04:35 GMT 2005 : [FATAL] ConvertXMLToAFP:
> org.apache.fop.apps.FOPException: Invalid byte 1 of 1-byte UTF-8
> sequence.
I just stepped through this in the debugger, and the root cause is a
UTFDataFormatException. The example you sent has the following xml
prolog:
<?xml version="1.0" encoding="utf-8"?>
This specifies that the file is encoded using utf-8. However, the file
isn't really encoded this way, so the xml parser trips over itself and
gives up.
I tried removing the encoding declaration from the prolog, and
everything seemed to work fine. i.e. use the following prolog instead:
<?xml version="1.0"?>
This will use the default encoding for your system (which worked for me
int this case).
HTH,
--
Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.com/
|