Attachment "523988.patch" to
ticket [523988ffff]
added by
hobbs
2002-03-02 10:16:03.
Index: generic/tclIO.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIO.c,v
retrieving revision 1.52
diff -b -u -r1.52 tclIO.c
--- generic/tclIO.c 15 Feb 2002 14:28:49 -0000 1.52
+++ generic/tclIO.c 2 Mar 2002 03:03:27 -0000
@@ -3777,7 +3777,7 @@
char *dst;
int offset, toRead, dstNeeded, spaceLeft, result, rawLen, length;
Tcl_Obj *objPtr;
-#define ENCODING_LINESIZE 30 /* Lower bound on how many bytes to convert
+#define ENCODING_LINESIZE 20 /* Lower bound on how many bytes to convert
* at a time. Since we don't know a priori
* how many bytes of storage this many source
* bytes will use, we actually need at least
@@ -3860,6 +3860,12 @@
statePtr->inputEncodingFlags, &statePtr->inputEncodingState,
dst, spaceLeft, &gsPtr->rawRead, &gsPtr->bytesWrote,
&gsPtr->charsWrote);
+
+ /*
+ * [Bug #523988]
+ */
+ statePtr->inputEncodingFlags &= ~TCL_ENCODING_START;
+
if (result == TCL_CONVERT_MULTIBYTE) {
/*
* The last few bytes in this channel buffer were the start of a