jberry      2003/08/26 06:58:49

  Modified:    c/src/xercesc/util/Transcoders/MacOSUnicodeConverter
                        MacOSUnicodeConverter.cpp
  Log:
  Fix bug #22697; transcodeFrom incorrectly throws on kTECOutputBufferFullStatus. 
Thanks to [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.16      +2 -12     
xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
  
  Index: MacOSUnicodeConverter.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- MacOSUnicodeConverter.cpp 22 May 2003 14:42:32 -0000      1.15
  +++ MacOSUnicodeConverter.cpp 26 Aug 2003 13:58:49 -0000      1.16
  @@ -655,13 +655,11 @@
        &bytesProduced,
        reinterpret_cast<UniCharArrayPtr>(toFill));
                
  -     if (status == kTECUsedFallbacksStatus)
  +     if (status == kTECOutputBufferFullStatus || status == kTECUsedFallbacksStatus)
                status = noErr;
        
       if (status != noErr)
  -    {
           ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
  -    }
        
        std::size_t charsProduced = bytesProduced / sizeof(UniChar);
        
  @@ -773,14 +771,6 @@
                   , getEncodingName()
               );
        }
  -     
  -     // These were removed because we actually have succeeded in transcoding part of
  -     // the string; this logic should probably be changed to deal with 
non-transcodable
  -     // text somehow; if options != UnRep_Throw, and we zero these values, we get in
  -     // to an infinite loop and hang the machine
  -     
  -     //totalCharsConsumed = 0;
  -     //totalCharsProduced = 0;
       }
        
       charsEaten = totalCharsConsumed;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to