You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by susy pfeiffer <su...@cp.net> on 2002/11/15 19:11:13 UTC

Urgent :character encoding problem

Hi all,

if I send an xml doc with the iso8859-1 encoding and quote extended chars with e.g. #&169;
everything works fine with the sax parser. I have read in the specs that it also works with the name e.g. &copy; but
it doesn't seem to work. 

What am I doing wrong here ? 
can anyone help

thanks in advance
<?xml version = "1.0" encoding = "ISO-8859-1"?> 
<messages> 

   <message> 
       <signal>!LogonReq</signal> 
       <Password>hello</Password> 
       <Name>hello</Name> 
   </message> 

   <message> 
       <signal>SubmitReq</signal> 
       <Destination>491724711</Destination> 
        <Body>&yen;</Body> 
       <Sequence>123</Sequence> 
   </message> 

   <message> 
       <signal>!LogoffReq</signal> 
   </message> 

</messages> 


XML|1037380072154 **Parsing Fatal Error**
 XML|1037380072154  Line: 5
 XML|1037380072154  URI: null
 XML|1037380072154  Message: The entity "copy" was referenced, but not
 declared.
 XML|1037380072155 Fatal Error encountered
 XML|1037380072155       at
 com.netcs.mobile.xml.MyErrorHandler.fatalError(MyErrorHandler.java:113)
 XML|1037380072155       at
 org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1225)
 XML|1037380072155       at
 org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:596)
 XML|1037380072155       at
 org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1320)
 XML|1037380072156       at
 org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 XML|1037380072156       at
 org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
 XML|1037380072156       at
 com.netcs.mobile.xml.MySaxParser2.parseString(MySaxParser2.java:44)





______________________________________________________ 
Susy Pfeiffer
Development Mobile
Critical Path
Katharinenstr. 17-18
D-10711 Berlin
Germany
+49 30 89 6600 (Direct)
+49 30 89 660999 (Fax)
susy.pfeiffer@cp.net
www.cp.net 



    






Re: Urgent :character encoding problem

Posted by susy pfeiffer <su...@cp.net>.
Thanks a lot.


----- Original Message ----- 
From: "Joseph Kesselman" <ke...@us.ibm.com>
To: <xe...@xml.apache.org>
Sent: Friday, November 15, 2002 7:23 PM
Subject: Re: Urgent :character encoding problem


> XML does not automatically define the entity &copy;. Your document's 
> Doctype can do so (internally or via an external DTD file), but unless 
> that's done &copy; has no meaning.
> 
> &copy; works in HTML because HTML's DTD *does* define it.
> 
> ______________________________________
> Joe Kesselman  / IBM Research
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Urgent :character encoding problem

Posted by Joseph Kesselman <ke...@us.ibm.com>.
XML does not automatically define the entity &copy;. Your document's 
Doctype can do so (internally or via an external DTD file), but unless 
that's done &copy; has no meaning.

&copy; works in HTML because HTML's DTD *does* define it.

______________________________________
Joe Kesselman  / IBM Research

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org