At 4:40 PM +0200 7/24/01, Jordi Massaguer wrote: >Hi all! > >I think I have an encoding problem and I don't know how to solve it. The >problem is that when the parser finds "uncommon" characters like for >example "@" it crashes. My xml file stars like this: >
Define "crash". I doubt very much it crashes. Java programs rarely do. I suspect it's throwing an exception because it's detected a well-formedness error in your document. The @ sign is a little unusual. Is that really a character that's giving you problems? By any chance does it immediately follow a non-ASCII character? ><?xml version="1.0" encoding="UTF-8"?> > And is your document actually written in UTF-8? If it's not, that would explain the problem. >I think that maybe a solution would be to change the encoding, but I >don't know which to write so it accepts the larger set of characters. > The encoding you declare must match the encoding you actually use. You can't change one without changing the other. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible, 2nd Edition (Hungry Minds, 2001) | | http://www.ibiblio.org/xml/books/bible2/ | | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ | +----------------------------------+---------------------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
