History Of Ticket 570aa112299e92f023ec03ae226e4cbd797c55b8

Artifacts Associated With Ticket 570aa112299e92f023ec03ae226e4cbd797c55b8

  1. Ticket change [3c4975654f] (rid 2638) by anonymous on 2020-05-11 16:57:42:

    1. comment initialized to:
      <div>Dear Roy,</div><div><br /></div><div>thank you for great KitCreator. This is another ticket in the series of this Wiki page:</div><div>[https://wiki.tcl-lang.org/page/Embedding+TCL+program+in+DLL?V=28].</div><div><br /></div><div>In folder:<br /></div><div>kitCreator/kitsh/buildsrc/kitsh0.0</div><div><br /></div><div>File kitInit.c, Line 392:</div><div><br /></div><div>&lt;verbatim&gt;</div><div>Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&amp;encodingName), 0);<br /></div><div>&lt;/verbatim&gt;<br /></div><div><br /></div><div>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.</div><div><br /></div><div>File boot.tcl, Line 103:</div><div><br /></div><div>"encoding system" is checked for result "identity" as a sign, that the system encoding is not set.</div><div>Since tcl 8.6.0, the default is "iso8859-1" and not "identity".</div><div><br /></div><div>Thus, I propose to change the code (perhaps only for tcl 8.6.x) to:</div><div><br /></div><div>&lt;verbatim&gt;</div><div><br /></div><div>if {[info exists ::tclkit_system_encoding] &amp;&amp; $::tclkit_system_encoding != "" &amp;&amp; [encoding system] ne $::tclkit_system_encoding } {<br />&nbsp;&nbsp;&nbsp; catch {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; encoding system $::tclkit_system_encoding<br />&nbsp;&nbsp;&nbsp; }<br />}</div><div><br /></div><div>&lt;/verbatim&gt;<br /></div><div><br /></div><div>This works for me to change the system encoding to "cp1252" using a C-VFS within a DLL.</div><div><br /></div><div>Another change may be done to the lines just after this block:</div><div><br /></div><div>&lt;verbatim&gt;</div><div><br /></div><div># If we've still not been able to set the encoding, revert to Tclkit defaults<br />if {[encoding system] eq "identity"} {<br />&nbsp;&nbsp;&nbsp; catch {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; switch $::tcl_platform(platform) {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; windows&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; { encoding system cp1252 }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; macintosh&nbsp;&nbsp;&nbsp; { encoding system macRoman }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; { encoding system iso8859-1 }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />}</div><div><br /></div><div>&lt;/verbatim&gt;</div><div><br /></div><div>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.</div><div><br /></div><div>What do you think ?</div><div><br /></div><div>Thank you for all,</div><div>Harald<br /></div><div><br /></div><div><br /></div>
      
    2. foundin initialized to: "trunk"
    3. login: "anonymous"
    4. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    5. severity initialized to: "Minor"
    6. status initialized to: "Open"
    7. title initialized to:
      Kit: boot.tcl uses encoding "identity" instead "iso8859-1" since 8.6.0, kitInit.c TCL_GLOBAL scope missing
      
    8. type initialized to: "Code Defect"