[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    cvs commit: xml-xerces/java/src/org/apache/xerces/impl XMLEntityManager.java
From:       neilg () apache ! org
Date:       2001-12-18 16:58:45
[Download RAW message or body]

neilg       01/12/18 08:58:45

  Modified:    java/src/org/apache/xerces/impl XMLEntityManager.java
  Log:
  fix a bug where we would parse a document with a Java encoding (not an IANA \
encoding) irrespective of the value of the allow-java-encodings feature.  
  Revision  Changes    Path
  1.15      +10 -1     \
xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java  
  Index: XMLEntityManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XMLEntityManager.java	2001/12/17 16:41:12	1.14
  +++ XMLEntityManager.java	2001/12/18 16:58:45	1.15
  @@ -112,7 +112,7 @@
    * @author Andy Clark, IBM
    * @author Arnaud  Le Hors, IBM
    *
  - * @version $Id: XMLEntityManager.java,v 1.14 2001/12/17 16:41:12 neilg Exp $
  + * @version $Id: XMLEntityManager.java,v 1.15 2001/12/18 16:58:45 neilg Exp $
    */
   public class XMLEntityManager
       implements XMLComponent, XMLEntityResolver {
  @@ -1277,7 +1277,16 @@
           // try to use a Java reader
           String javaEncoding = EncodingMap.getIANA2JavaMapping(ENCODING);
           if (javaEncoding == null) {
  +            if(fAllowJavaEncodings) {
               javaEncoding = encoding;
  +            } else {
  +                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  +                                       "EncodingDeclInvalid",
  +                                       new Object[] { encoding },
  +                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
  +                // see comment above.
  +                javaEncoding = "ISO8859_1";
  +            }
           }
           if (DEBUG_ENCODINGS) {
               System.out.print("$$$ creating Java InputStreamReader: \
encoding="+javaEncoding);  
  
  

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic