Skip to content
Tcl Source Code History Of Ticket 8f89e2e059
Login

History Of Ticket 8f89e2e059

Artifacts Associated With Ticket 8f89e2e059

  1. Ticket change [fbb2a53754] (rid 179995) by bll on 2020-03-10 22:04:10:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      If you want to try this in cmd.exe, be sure to set the cmd.exe font 
      to "Lucida Console".  I don't have the hungarian locale, so the locale
      is set to US.  I ran a [glob -directory C:/Users *] and the proper value
      is returned.
      
      C:\Users\Gergő\Desktop\BallroomDJ>.\windows\64\tcl\bin\tclsh.exe
      % puts $::env(USERPROFILE)
      C:\Users\Gergo
      % exit
      
      C:\Users\Gergő\Desktop\BallroomDJ>echo %USERPROFILE%
      C:\Users\Gergő
      
      C:\Users\Gergő\Desktop\BallroomDJ>
      
    5. foundin initialized to: "8.6.10"
    6. is_private initialized to: "0"
    7. login: "bll"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "bll"
    13. subsystem initialized to: "- New Builtin Commands"
    14. title initialized to:
      Windows: environment is not reflected properly (special characters)
      
    15. type initialized to: "Bug"
  2. Ticket change [e83fb5ffad] (rid 179996) by bll on 2020-03-10 22:54:06:

    1. icomment:
      I tried 
         chcp 1250
      and no better.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  3. Ticket change [0615cd1cb7] (rid 179997) by bll on 2020-03-10 23:33:15:

    1. icomment:
      Note that 'Gergő' is using some windows code page, not utf-8. 
      So there are all sorts of problems using windows account names with
      special characters, as you can very easily get mixed encodings within
      path names.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  4. Ticket change [f4ed6a0c8f] (rid 180000) by sebres on 2020-03-11 10:49:34:

    1. icomment:
      The code page of console does no matter, neither for supplying environment parameters nor for the substitution of them.
      Currently tcl uses a system encoding to convert environment to utf-8.
      So (unless it is fixed) you can set it to something better matching your locale (I guess cp1252)... I believe cp437 is not really suitable for Hungarian locale.
      
      Note that in example below I changed console CP (to utf-8) only in order to see proper output for different encodings (it does not affect the system encoding).
      
      <code><pre style="padding-left:10pt">
      > chcp 65001
      > set TEST=--äöüß-- && tclsh86
      % puts [encoding system]\t$env(TEST)
      cp1252  --äöüß--
      % encoding system cp437
      % puts [encoding system]\t$env(TEST)
      cp437   --Σ÷ⁿ▀--
      % encoding system cp1251
      % puts [encoding system]\t$env(TEST)
      cp1251  --дцьЯ--
      </pre></code>
      As you can see the value gets changed related to the system encoding currently used.
      
      This behavior can (and I guess, must) be changed since Windows has a wide-char functions to obtain environment...<br/>
      I have already fixed that in my own fork and would take a look whether it can be back-ported without compat issues.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [582d040d1f] (rid 180017) by bll on 2020-03-12 15:01:19:

    1. icomment:
      Even with the correct system encoding set on the command line, the
      environment isn't picked up properly.
      
      I hope your fixes can be applied.   I don't expect that special characters
      in the account name will ever work well due to mixed encodings in the path
      name, but having environment variables that are not valid at all is definitely
      wrong.
      
      C:\Users\Gregő\Desktop\BallroomDJ>.\windows\64\tcl\bin\tclsh.exe -encoding cp1250
      % puts $::env(USERPROFILE)
      C:\Users\Grego
      % puts [file exists $::env(USERPROFILE)]
      0
      %
      
    2. login: "bll"
    3. mimetype: "text/plain"
  6. Ticket change [26c9be38b0] (rid 180027) by sebres on 2020-03-12 18:22:19:

    1. icomment:
      1. You cannot change the system encoding via command line parameter - this specifies only the char-set of the content of given script (so basically loads the file with proper encoding only):
      <verbatim>
         # this does not change system encoding:
         > echo puts [encoding system] | tclsh86 -encoding utf-8
         cp1252
         # this will load "main.tcl" using utf-8, but also does not change sys-encoding:
         > echo puts [encoding system] > %TEMP%\main.tcl
         > tclsh86.exe -encoding utf-8 %TEMP%\main.tcl && del %TEMP%\main.tcl
         cp1252
      </verbatim>
      So you have either to set it properly in the system or in the main script self.
      
      2. I tried to back-port my "fix" and got many conflicts I have still to resolve (and I'm pretty sure I get some things in env.test that I have to correct too)... be patient.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  7. Ticket change [e590634ee7] (rid 180073) by sebres on 2020-03-13 13:10:52:

    1. icomment:
      Fix is provided in branch [/timeline?r=bug-8f89e2e059|[bug-8f89e2e059]] (tested for windows only with make-build)
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  8. Ticket change [b8c8e7d95e] (rid 180079) by jan.nijtmans on 2020-03-13 15:03:40:

    1. icomment:
      Tested now on Visual Studio too. Made some additional fixes.
      
      I think it's good to be merged to 8.6.
      
      Thanks!
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  9. Ticket change [3917586aab] (rid 180083) by sebres on 2020-03-13 15:38:19:

    1. icomment:
      Ok, let us see what Travis will say about the branch :)
      
    2. login: "sebres"
    3. mimetype: "text/plain"
  10. Ticket change [144c1f69ac] (rid 180145) by sebres on 2020-03-16 13:05:09:

    1. closedate changed to: "2458925.04524944"
    2. closer changed to: "sebres"
    3. icomment:
      Merged, thus close.
      Thx, Jan!
      
    4. login: "sebres"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"