Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f4ed6a0c8fe25ef54bc151fec8af8788bd7de10bfe89521c855b6ec90c6d7b16
Ticket: 8f89e2e059aafa1cff0622d85efb936f48c04411
Windows: environment is not reflected properly (special characters)
User & Date: sebres on 2020-03-11 10:49:34
Changes

  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"