Skip to content
Tcl Source Code History Of Ticket 5d70d14a092160d1
Login

History Of Ticket 5d70d14a092160d1

Artifacts Associated With Ticket 5d70d14a092160d1

  1. Ticket change [3804b42113] (rid 236813) by anonymous on 2025-01-11 11:28:45:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      I have a following test (sources encoded as utf-8)
      
      --- all.tcl ---
      package require tcltest
      ::tcltest::runAllTests
      ---------------
      
      --- utf8.test ---
      package require tcltest 2.5
      ::tcltest::test notascii {string corrupted when singleproc == 0} {
          string length "äöü"
      } 3
      -----------------
      
      Test passes in singleproc mode:
      > tclsh all.tcl -singleproc 1
      
      Test fails for default run:
      > tclsh all.tcl
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  *.test
      Tests began at Sat Jan 11 13:04:12 EET 2025
      utf-8.test
      
      
      ==== notascii string corrupted when singleproc == 0 FAILED
      ==== Contents of test case:
      
          string length "äöü"
      
      ---- Result was:
      6
      ---- Result should have been (exact matching):
      3
      ==== notascii FAILED
      
      Environment:
      
      tcl_platform(byteOrder)     = littleEndian
      tcl_platform(engine)        = Tcl
      tcl_platform(machine)       = amd64
      tcl_platform(os)            = Windows NT
      tcl_platform(osVersion)     = 10.0
      tcl_platform(pathSeparator) = ;
      tcl_platform(platform)      = windows
      tcl_platform(pointerSize)   = 8
      tcl_platform(threaded)      = 1
      tcl_platform(user)          = user
      tcl_platform(wordSize)      = 4
      tcl = 8.6.17
      tcltest = 2.5.9
      
      Problem:
      
      tcltest's runAllTests sources test file as utf-8 for singleProc:
      --- tcltest-2.5.9.tm ---
      ...
      2926: uplevel 1 [list ::source -encoding utf-8 $file]
      ...
      ---
      
      and runAllTests runs test file using system defaults otherwise
      --- tcltest-2.5.9.tm ---
      ...
      2950: set cmd [linsert $childargv 0 | $shell $file]
      ...
      2953: set pipeFd [open $cmd "r"]
      ...
      ---
      
    5. foundin initialized to: "8.6.17"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "adbf9acf8babf33ccf30baaf363c2949e21b82be"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "34. tcltest Package"
    15. title initialized to:
      tcltest: test result differs for different singleproc values
      
    16. type initialized to: "Bug"
  2. Ticket change [c419b5ca92] (rid 236819) by jan.nijtmans on 2025-01-11 23:03:46:

    1. icomment:
      Let me guess. What does "encoding system" give on your system? Does it look like?:
      <pre>
      $ tclsh86
      % encoding system
      cp1252
      </pre>
      If so, the answer with -singleproc is wrong, the default run is right. Since the source-file is considered cp1252, the length of the string is indeed 6.
      
      What we can do is sourcing "all.tcl" in utf-8 regardless of the system-encoding. See [5e8914a8ad|here]
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [ed366cc5f7] (rid 236820) by jan.nijtmans on 2025-01-11 23:52:28:

    1. icomment: "Hm. that doesn't work ....."
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [fd26621362] (rid 236822) by anonymous on 2025-01-12 07:19:54:

    1. icomment:
      Sorry, I didn't make it clear that the test file should be saved in utf-8 encoding.
      
      C:\Temp>tclsh
      % encoding system
      cp1251
      
      C:\Temp>file utf-8.test
      utf-8.test: Tcl script, Unicode text, UTF-8 text, with CRLF line terminators
      
      My system encoding is cyrillic cp1251 but the test with cyrillic chars also failed
      
      --- utf-8.test ---
      package require tcltest 2.5
      
      ::tcltest::test notascii_cyr {string corrupted when singleproc == 0} {
          string length "іїє"
      } 3
      ------------------
      
      ==== notascii_cyr string corrupted when singleproc == 0 FAILED
      ==== Contents of test case:
      
          string length "їіє"
      
      ---- Result was:
      6
      ---- Result should have been (exact matching):
      3
      ==== notascii_cyr FAILED
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  5. Ticket change [7606176846] (rid 236823) by anonymous on 2025-01-12 07:34:06:

    1. icomment:
      And yes, am using -encoding utf-8 for tclsh
      
      But runAllTest (when singleproc==0) 'exec' secondary tclsh without '-encoding utf-8'.
      
      > tclsh -encoding utf-8 all.tcl -singleproc 0
      fails
      
      > tclsh -encoding utf-8 utf-8.test
      works
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  6. Ticket change [f09f3dac48] (rid 253751) by apnadkarni on 2026-05-22 09:45:34:

    1. closedate changed to: "2461182.9066543058"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Closing as won't fix. Issues does not exist in 9.0 and 8.6 is EOL.
      
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
    6. resolution changed to: "Wont Fix"
    7. status changed to: "Closed"