You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/10/24 21:11:39 UTC

cvs commit: xml-xerces/c/src/com XMLDOMDocument.cpp

tng         01/10/24 12:11:39

  Modified:    c/src/com XMLDOMDocument.cpp
  Log:
  [Bug 2456] loadXML gives an exception.  Fixed by Sean Bright.  Originally, UTF-16 was set as the encoding
  which caused Xerces to look for a byte order mark that would not be present
  in a string (but would in a file).  Setting UTF-16LE explicitly sets the byte order.
  
  Revision  Changes    Path
  1.9       +2 -2      xml-xerces/c/src/com/XMLDOMDocument.cpp
  
  Index: XMLDOMDocument.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/com/XMLDOMDocument.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLDOMDocument.cpp	2001/05/11 13:25:02	1.8
  +++ XMLDOMDocument.cpp	2001/10/24 19:11:39	1.9
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLDOMDocument.cpp,v 1.8 2001/05/11 13:25:02 tng Exp $
  + * $Id: XMLDOMDocument.cpp,v 1.9 2001/10/24 19:11:39 tng Exp $
    */
   
   #include "stdafx.h"
  @@ -1426,7 +1426,7 @@
   			else {
   				XMLByte *pXMLByte =  reinterpret_cast<XMLByte*> (static_cast<XMLCh*>(pThis->m_xml));
   				MemBufInputSource memBufIS(pXMLByte,pThis->m_xml.length()*sizeof(XMLCh),OLESTR("IBMXMLParser"),false);
  -				memBufIS.setEncoding(OLESTR("UTF-16"));
  +				memBufIS.setEncoding(OLESTR("UTF-16LE"));
   				if (!pThis->m_bParseError && !pThis->m_bAbort)
   					parser.parse(memBufIS);
   			}
  
  
  

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