Artifacts Associated With Ticket 570aa11229
Ticket change [3c4975654f] (rid 2638) by anonymous on 2020-05-11 16:57:42:
- 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><verbatim></div><div>Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);<br /></div><div></verbatim><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><verbatim></div><div><br /></div><div>if {[info exists ::tclkit_system_encoding] && $::tclkit_system_encoding != "" && [encoding system] ne $::tclkit_system_encoding } {<br /> catch {<br /> encoding system $::tclkit_system_encoding<br /> }<br />}</div><div><br /></div><div></verbatim><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><verbatim></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 /> catch {<br /> switch $::tcl_platform(platform) {<br /> windows { encoding system cp1252 }<br /> macintosh { encoding system macRoman }<br /> default { encoding system iso8859-1 }<br /> }<br /> }<br />}</div><div><br /></div><div></verbatim></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>
- foundin initialized to: "trunk"
- login: "anonymous"
- private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- severity initialized to: "Minor"
- status initialized to: "Open"
- title initialized to:
Kit: boot.tcl uses encoding "identity" instead "iso8859-1" since 8.6.0, kitInit.c TCL_GLOBAL scope missing
- type initialized to: "Code Defect"
- comment initialized to: