Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0773c3352fc56c6aea5a84dafb89e79bcaf63b82
Ticket: 3483277fffffffffffffffffffffffffffffffff
Problem with command "string map" in Tcl 8.5
User & Date: sebres on 2012-02-03 16:52:22
Changes

  1. icomment:
    the Tcl_EvalFile reads the file in current system encoding of given interpreter:
    also if you "encoding system" returns here as example "cp1252" - your source file should be in "cp1252". 
    
    The multi byte <-> single byte (auto) translation can be a little bit different between 8.5 and 8.3. But i could not reproduce it, without more information, such platform, system encoding, file encoding, "init.tcl" loaded (or not), etc. 
    
    Otherwise, read the file in the "file encoding" with "Tcl_FSEvalFileEx": 
    
    Tcl_Obj *pathPtr = Tcl_NewStringObj("filename.tcl", -1);
    Tcl_IncrRefCount(pathPtr);
    ret = Tcl_FSEvalFileEx(interp, pathPtr, encodingName);
    Tcl_DecrRefCount(pathPtr);
    
    or by using of pure tcl:
    
    source -encoding "utf-8" "filename.tcl"
    
    
    
  2. login: "sebres"
  3. mimetype: "text/plain"
  4. username: "sebres"