Skip to content
Tcl Source Code History Of Ticket 506296ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 506296ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 506296ffffffffffffffffffffffffffffffffff

  1. Ticket change [cb5afd1a17] (rid 95498) by nobody on 2002-01-21 05:39:59:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This happens on tcl8.3.4 (also tested on 8.3.3) on Linux.
      
      I have a channel open for writing with encoding
      iso2022-jp. When I "puts" a certain string tcl gets
      stuck in a loop and the output file starts growing
      indefinitely. The problem can be demonstrated by the
      following script:
      
      set string [format %s%c [string repeat " " 4094] 12399]
      set f [open out w 0644]
      fconfigure $f -encoding iso2022-jp
      puts -nonewline $f $string
      close $f
      
      This script will, when executed, never get past teh
      puts statement and the outfile will start to grow (fast:-).
      
      The problem lies in WriteChars in tclIO.c. When
      Tcl_UtfToExternal is called with TCL_ENCODING_START set
      among the flags, then it will always generate at least
      three bytes (assuming the output encoding is
      iso2022-jp).  However it did not consume any of the
      characters in the input buffer (at least not if
      TCL_ENCODING_END is clear). But the logic in WriteChars
      thinks that since it generated output we shoudl call it
      again...
      
      The attached patch fixes this by removing the
      TCL_ENCODING_START bit from flags after the first call
      to Tcl_UtfToExternal.
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to: "Trouble writing iso2022-jp"
    11. type initialized to: "Bug"
  2. Ticket change [7892a13de4] (rid 89982) by andreas_kupries on 2002-01-21 12:53:07:

    1. closedate changed to: "2002-01-21T05:53:07"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Duplicate of
      http://sourceforge.net/tracker/?func=detail&aid=506297&group_id=10894&atid=110894
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"