[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: cvs commit: xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter MacOSUnicodeConverter.cp
From: jberry () apache ! org
Date: 2003-08-26 13:58:49
[Download RAW message or body]
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 benoit.blaquiere@ign.fr
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: 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