Lawrence and others,

thanks for your mails.  

It now works as expected (for my prototype ;))

string.getBytes("utf-8");

solved my problem.

Now FOP runs ;)

Sorry for bothering you guys. But I thought
it would be OK if I tell my XML file, that its encoding
is "utf-8"

-Matthias


> -----Urspr�ngliche Nachricht-----
> Von: Lawrence Jones [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 20. Mai 2005 00:11
> An: [email protected]
> Betreff: RE: Using XMLBeans to parse content from XML (UTF-8?)
> 
> 
> Hi Matthias
> 
> There's multiple things that could be wrong here. The fact 
> that you have an input XML file that says it is UTF-8 does 
> not guarantee that the bytes are actually recorded as UTF-8. 
> However we've read those bytes in - so at some stage they 
> were converted to chars and we understood them - so that's 
> likely not your problem.
> 
> More likely it's an error at the point where you save the 
> output string as bytes - there may be a mismatch between the 
> character encoding you use to do the output and the character 
> encoding of the rest of the document (either explicitly or 
> implicitly declared).
> 
> Can you attach the parts of your code where you a) read in 
> the instance XML file and b) output the string to your XSL-FO 
> file and I'll try to help?
> 
> Cheers,
> 
> Lawrence
> 
> > -----Original Message-----
> > From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 19, 2005 8:00 AM
> > To: [email protected]
> > Subject: Using XMLBeans to parse content from XML (UTF-8?)
> > 
> > Hi all,
> > 
> > I am using (more evaluating) XMLBeans (1.0.4) to read in a 
> Java way my
> > content.
> > 
> > I created a XSD and generated my clazzes/interfaces. Fine! 
> I now have a
> > xml file,
> > that contains some *text* that I read with XMLBeans and it 
> copies the
> > content (from XML)
> > to the generated clazzes/interfaces. Fine!
> > 
> > Now I copy the (string) properties form generated 
> clazzes/interfaces to my
> > *business classes*.
> > And I am presenting them in a html file. fine! The website works.
> > 
> > but, if I use the (string) properties inside a XSL-FO (to 
> generate a PDF)
> > it doesn't work.
> > FOP throws an exception (java.io.UTFDataFormatException)
> > I guess there is something with xmlbeans UTF-8 wrong?  But what ?
> > 
> > My XML document uses German umlauts, but it contains
> > <?xml version="1.0" encoding="utf-8"?>
> > (followed by my content...)
> > 
> > It is not an issue of Apache FOP(that is the processor I am using to
> > process my XSL-FO), I guess.
> > I tested the XSL-FO during debuging...
> > copied the XSL-FO string (containing the *value* from my 
> xml document) to
> > a *local* file and now FOP created the PDF
> > as aspected. But not *on the fly* (the FOP shows me (with 
> the same XSL-FO
> > string) an java.io.UTFDataFormatException)
> > 
> > Note, I replaced the german umlaut (� -> o) then it works.
> > 
> > I really guess, I am doing something wrong with XMLBeans and UTF-8.
> > 
> > does anybody have an idea for me?
> > 
> > Thanks in advice.
> > Matthias
> > 
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to