Those errors usually deal with encoding. This is probably an InputSource you are using? If you are using a Character Stream a.k.a readers and writers this shouldn't matter. Are you using a sax InputSource or a Reader? If you are using an InputSource object are you tying it to a Stream or a Reader? If it is a Reader and your still have the problem you shouldn't ( I don't think ), but when all else fails set the encoding on the InputSource to the encoding scheme the ISO Latin1 Encoding (that's more than likely what you are using with your windows). You may be able to play with the file.encoding System property...questionable on that one as I have not tried.
Wade -----Original Message----- From: Barley [mailto:[EMAIL PROTECTED] Sent: Sunday, November 30, 2003 4: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
