Ticket Change Details
Overview

Artifact ID: 3c4975654f187ff4a1780d1ee1f3d841186f59e5
Ticket: 570aa112299e92f023ec03ae226e4cbd797c55b8
Kit: boot.tcl uses encoding "identity" instead "iso8859-1" since 8.6.0, kitInit.c TCL_GLOBAL scope missing
User & Date: anonymous on 2020-05-11 16:57:42
Changes

  1. Change comment to:
    Dear Roy,

    thank you for great KitCreator. This is another ticket in the series of this Wiki page:

    In folder:
    kitCreator/kitsh/buildsrc/kitsh0.0

    File kitInit.c, Line 392:

    <verbatim>
    Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);
    </verbatim>

    For me, the last parameter should be changed from "0" to "TCL_GLOBAL_ONLY" to make the variable "tclkit_system_encoding" visible for boot.tcl.

    File boot.tcl, Line 103:

    "encoding system" is checked for result "identity" as a sign, that the system encoding is not set.
    Since tcl 8.6.0, the default is "iso8859-1" and not "identity".

    Thus, I propose to change the code (perhaps only for tcl 8.6.x) to:

    <verbatim>

    if {[info exists ::tclkit_system_encoding] && $::tclkit_system_encoding != "" && [encoding system] ne $::tclkit_system_encoding } {
        catch {
            encoding system $::tclkit_system_encoding
        }
    }

    </verbatim>

    This works for me to change the system encoding to "cp1252" using a C-VFS within a DLL.

    Another change may be done to the lines just after this block:

    <verbatim>

    # If we've still not been able to set the encoding, revert to Tclkit defaults
    if {[encoding system] eq "identity"} {
        catch {
            switch $::tcl_platform(platform) {
                windows        { encoding system cp1252 }
                macintosh    { encoding system macRoman }
                default        { encoding system iso8859-1 }
            }
        }
    }

    </verbatim>

    I suppose, the platform "macintosh" has changed to "darwin". As utf-8 is now the default for mac and many Unix (which is an always present internal encoding), this block may perhaps be removed entirely.

    What do you think ?

    Thank you for all,
    Harald


  2. Change foundin to "trunk"
  3. Change login to "anonymous"
  4. Change private_contact to "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  5. Change severity to "Minor"
  6. Change status to "Open"
  7. Change title to:

    Kit: boot.tcl uses encoding "identity" instead "iso8859-1" since 8.6.0, kitInit.c TCL_GLOBAL scope missing

  8. Change type to "Code Defect"