Have you seen this?
http://castor.exolab.org/xml-faq.html#How-do-I-set-the-encoding?

      > -----Original Message-----
      > From: Barley [mailto:[EMAIL PROTECTED] 
      > Sent: Sunday, November 30, 2003 3:19 PM
      > To: [EMAIL PROTECTED]
      > Subject: [castor-dev] Cator fails to unmarshall certain 
      > characters
      > 
      > 
      > I have a confusing (to me )problem that I hope has an 
      > easy solution. It seems to stem from users entering 
      > non-standard characters into my app by copy/pasting 
      > from Microsoft Word. These characters include the open 
      > quote and close quote symbols, as well as 1/2 and other 
      > weird characters.
      > 
      > So, my users are able to paste Strings containing those 
      > characters into JTextArea's. Java String properties can 
      > successfully store the characters, and castor can 
      > marshal them to XML files. However, when I try to 
      > unmarshal, using the same mapping, objects and 
      > everything, I get this exception:
      > 
      > java.io.UTFDataFormatException: Invalid byte 1 of 
      > 1-byte UTF sequence
      > 
      > Every time I try to unmarshall a file which has one of 
      > these funky characters in it. So, my question is, why 
      > is Castor able to marshal, but not unmarshal these 
      > characters? Is there a way to filter the unwanted 
      > characters out before marshalling? Or is there a way to 
      > unmarshall the strange characters successfully? Do I 
      > change from UTF-8 to something else?
      > 
      > I'm pretty confused, but I really need to find a 
      > solution to this. If anyone has any ideas, I'd sure 
      > appreciate it.
      > 
      > Gregg
      > 
      > ----------------------------------------------------------- 
      > If you wish to unsubscribe from this mailing, send mail 
      > to [EMAIL PROTECTED] with a subject of:
      >         unsubscribe castor-dev
      > 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to