Skip to content
Tcl Source Code History Of Ticket 219210
Login

History Of Ticket 219210

Artifacts Associated With Ticket 219210

  1. Ticket change [0a3b23d5ec] (rid 113780) by nobody on 2000-10-26 05:03:38:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 3662 Bug
      Version: 8.2.2
      SubmitDate: '1999-11-23'
      LastModified: '1999-12-07'
      Severity: SER
      Status: Assigned
      Submitter: techsupp
      ChangedBy: hobbs
      OS: All
      FixedDate: '2000-10-25'
      ClosedDate: '1999-12-06'
      
      
      Name:
      Nikolai Saoukh
      
      set out [open k.txt w]
      fconfigure $out -encoding koi8-r
      puts $out "\u0410\u0410"
      close $out
      
      set in [open k.txt r]
      fconfigure $in -encoding koi8-r
      
      set out [open u.txt w]
      fconfigure $out -encoding utf-8
      
      fcopy $in $out
      
      close $in
      close $out
      
      
      It's not certain whether this is an RFE or bug, as the fcopy
      man page states that it only pays heed to the -translation
      option, not to -encoding.  This could be a bug, since -encoding
      came after fcopy was originally written.  The work-around is to
      replace the above fcopy with:
          puts $out [read $in]
      although there is no callback capability then. 
      -- 12/07/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.2.2"
    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: "63. (unused)"
    10. title initialized to: "fcopy does not respect encodings"
    11. type initialized to: "Bug"
  2. Ticket change [a3b02c3788] (rid 110084) by andreas_kupries on 2000-11-17 19:08:40:

    1. icomment:
      I consider it as bug, an incomplete adaption of the existing commands to the new i18n features, i.e. encodings. Recategorized to OtherIO as this problem is not restricted to sockets.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. priority changed to: "6"
    5. subsystem changed to: "62. (unused)"
    6. username: "andreas_kupries"
  3. Ticket change [ed49e51557] (rid 103852) by dkf on 2001-02-05 04:27:25:

    1. subsystem changed to: "24. Channel Commands"
  4. Ticket change [a346c88f9e] (rid 110024) by andreas_kupries on 2001-03-31 00:05:13:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Logged In: YES 
      user_id=75003
      
      Another problem with the workaround: It uses much more
      memory than fcopy because the whole file is loaded into the
      interpreter before written back out.
      
      
    3. login: "andreas_kupries"
    4. mimetype: "text/plain"
    5. username: "andreas_kupries"
  5. Ticket change [d32acb3766] (rid 123246) by andreas_kupries on 2001-03-31 20:22:45:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      The fix for this report has to be done in "tclIO.c",
      "CopyData", which
      currently uses "DoRead" and "DoWrite" for reading from and
      writing to
      the channels involved in the copying. Exchanging these two
      calls
      against stripped down versions of "Tcl_ReadChars" and
      "Tcl_WriteChars"
      should do the trick. "Stripped down" means here that we have
      avoid the
      call to "CheckChannelErrors" in these two routines as this
      routine
      flags their usage for a channel used in an "fcopy" as an
      error. I
      would propose to move the meat of these two routines into
      two internal
      procedures "DoReadChars" and "DoWriteChars" which are then
      called from
      the original routines. The originals would retain the error
      checking. And "CopyData" can use the internal procedures to
      get its
      own work done.
      
      Note the following consequences of the change:
      
      - The system will use UTF-8 internally when copying data,
      meaning that it will consume more memory, or copy less data
      per buffer.
      
      - Performance will be affected negatively because of the
      additional conversions to and from UTF-8. (Side note: Do we
      have performance tests for "fcopy" in "tclbench" ?).
      
      The code of the channel system uses 'statePtr->encoding ==
      NULL' as
      signal that the encoding is binary, and the two "Tcl_*Chars"
      procedures have special provisions for that case.
      Unfortunately not
      very efficient as it involves ByteArray objects.
      
      I would propose that "CopyData" should check for binary
      translation on
      _both_ channels and fall back to the old code in such a
      case. This
      would avoid quite a lot of conversions and copying. We
      shouldn't do
      this for a mixture of binary and non-binary encodings as we
      still need
      an intermediate ByteArray to get the conversion right for
      these cases,
      causing additional complexity in the new code. Better to
      stay with the
      tried and true code for that for now.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Ticket change [a82a6ba8d4] (rid 98930) by andreas_kupries on 2001-04-04 21:36:54:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Uploading a patch fixing the bug, adding tests and extending
      the documentation.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Add attachment "219210.diff.1" [ded6e7507f] (rid 114918) by andreas_kupries on 2001-04-04 21:36:54.

  8. Ticket change [d384218883] (rid 123301) by andreas_kupries on 2001-04-04 21:36:55:

    1. icomment:
      
      
      File Added - 4953: 219210.diff.1
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [e884a6b4c2] (rid 104658) by andreas_kupries on 2001-04-06 22:20:34:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      New patch, changing the fix slightly so that it doesn't do
      conversions which are not necessary. IOW, if both channels
      are set to the same encoding no conversion will occur and
      the transfer will run at the full old speed. The first patch
      did conversions in this case, lowering performance for a
      common case.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  10. Add attachment "219210.diff.3" [6ce496a0d1] (rid 128599) by andreas_kupries on 2001-04-06 22:20:34.

  11. Ticket change [025108279c] (rid 119623) by andreas_kupries on 2001-04-06 22:20:35:

    1. icomment:
      
      
      File Added - 5076: 219210.diff.3
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  12. Ticket change [8ee2f8073b] (rid 120195) by andreas_kupries on 2001-04-19 03:23:20:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Another small change to the patch, fixing another bug. Found
      through tclbench, i.e. performance tests. Will add the
      performance results too, with notes.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  13. Add attachment "219210.diff.5" [14caad5185] (rid 124462) by andreas_kupries on 2001-04-19 03:23:20.

  14. Ticket change [ac27bd5155] (rid 101244) by andreas_kupries on 2001-04-19 03:23:21:

    1. icomment:
      
      
      File Added - 5514: 219210.diff.5
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  15. Add attachment "fce.Benchmark.out.tar.gz" [3d3b0d2360] (rid 121055) by andreas_kupries on 2001-04-19 03:27:32.

  16. Ticket change [177d097e96] (rid 122506) by andreas_kupries on 2001-04-19 03:27:32:

    1. icomment:
      
      
      File Added - 5515: fce.Benchmark.out.tar.gz
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  17. Ticket change [961f1bec75] (rid 106270) by andreas_kupries on 2001-05-20 00:05:41:

    1. closedate changed to: "2001-05-19T17:05:41"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Patch committed.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"