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/06/26 21:28:27 UTC

cvs commit: xml-xerces/c/src/dom DOMString.cpp

tng         01/06/26 12:28:26

  Modified:    c/src/dom DOMString.cpp
  Log:
  [Bug 2119] DOMString::print() should use DOMString::transcode() for transcoding.
  
  Revision  Changes    Path
  1.21      +5 -14     xml-xerces/c/src/dom/DOMString.cpp
  
  Index: DOMString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/DOMString.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DOMString.cpp	2001/05/11 13:25:19	1.20
  +++ DOMString.cpp	2001/06/26 19:28:25	1.21
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: DOMString.cpp,v $
  + * Revision 1.21  2001/06/26 19:28:25  tng
  + * [Bug 2119] DOMString::print() should use DOMString::transcode() for transcoding.
  + *
    * Revision 1.20  2001/05/11 13:25:19  tng
    * Copyright update.
    *
  @@ -967,24 +970,12 @@
   
       if (len > 0)
       {
  -        XMLCh *p = fHandle->fDSData->fData;
  -
  -        // Copy the data from the DOMString buffer into another buffer.
  -        //  This is only required because the data in the DOMString buffer
  -        //  may not be null terminated, but we need the null here.
  -		XMLCh* buffer = new XMLCh[len+1];
  -        unsigned int i;
  -		for (i=0; i<len; i++)
  -		   buffer[i] = p[i];
  -		buffer[len] = 0;
  -
           // Transcode from Unicode to char * in whatever the system local code page is.
  -        char *pc = XMLString::transcode(buffer);
  +        char *pc = transcode();
           fputs(pc, stdout);
   
  -        delete [] buffer;
           delete [] pc;
  -    };
  +    }
   };
   
   
  
  
  

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