I encountered a similar error. The problem was that I was generating an XML document that contained non UTF-8 data but I incorrectly indicated that the document was UTF-8 in the prolog: <?xml version="1.0" encoding="UTF-8"?>. FOP encountered a non UTF-8 character (a foreign currency symbol in my case) and threw the same king of invalid byte sequence error.
The solution is to change the document's encoding. When generating your output document, change the encoding to "ISO-8859-1" or whatever the proper encoding is for the kind of character data your document contains. E.g. <?xml version="1.0" encoding="ISO-8859-1"?> Note: I am using Castor's Marshaller to generate an XML document from JavaBeans and I had to tell it to use the proper encoding like this: marshaller.setEncoding( "ISO-8859-1" ); -Steve -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 6:00 AM To: [EMAIL PROTECTED] Subject: UTF-8 errors Hi, When I run FOP, I get the following error... "Invalid byte 2 of 2 byte UTF-8 sequence" ...followed by an extensive trace. I have a pretty clear idea of what it mean but not what to do about it!! The following problems spring to mind... * What file is the invalid sequence in? Is it my xml (input) file or the xsl file? * Even if I identify the file, where/which character is causing the problem * how do I fix it :-) I guess what I am saying is that the error message is getting towards useless... Has anybody got any suggestions on how to proceed with this? Any help much appreciated --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
