You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/10/14 01:55:30 UTC

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

andyh       00/10/13 16:55:28

  Modified:    c/src/com XMLDOMDocument.cpp
  Log:
  COM: interpret BSTR as UTF-16 in documents.  Patch contributed by Devin Barnhart
  
  Revision  Changes    Path
  1.6       +4 -3      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLDOMDocument.cpp	2000/09/29 23:07:03	1.5
  +++ XMLDOMDocument.cpp	2000/10/13 23:55:27	1.6
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLDOMDocument.cpp,v 1.5 2000/09/29 23:07:03 aruna1 Exp $
  + * $Id: XMLDOMDocument.cpp,v 1.6 2000/10/13 23:55:27 andyh Exp $
    */
   
   #include "stdafx.h"
  @@ -1358,8 +1358,9 @@
   			if (pThis->m_FileName.length() > 0)
   				parser.parse(static_cast<LPCTSTR> (pThis->m_FileName));
   			else {
  -				XMLByte *pXMLByte =  reinterpret_cast<XMLByte*> (static_cast<LPTSTR>(pThis->m_xml));
  -				MemBufInputSource memBufIS(pXMLByte,pThis->m_xml.length(),OLESTR("IBMXMLParser"),false); 
  +				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"));
   				if (!pThis->m_bParseError && !pThis->m_bAbort)
   					parser.parse(memBufIS);
   			}