You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/08/26 02:57:40 UTC
DO NOT REPLY [Bug 22697] -
MacOSEncoder::transcodeFrom throws an exception where it should not.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22697>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22697
MacOSEncoder::transcodeFrom throws an exception where it should not.
jberry@criticalpath.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From jberry@criticalpath.com 2003-08-26 00:57 -------
Can you please verify that the following patch will fix your problem? Note that the change of only
one line is truly relevant. If so, I'll go ahead and commit it.
Thanks! James.
Index: src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
============================================================
=======
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/
MacOSUnicodeConverter.cpp,v
retrieving revision 1.15
diff -u -r1.15 MacOSUnicodeConverter.cpp
--- src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
22 May 2003 14:42:32 -0000 1.15
+++ src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
26 Aug 2003 00:52:00 -0000
@@ -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-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org