Sujet : Re: Tcl9: source files are interpreted as utf-8 by default
De : schmitzu (at) *nospam* mail.de (Uwe Schmitz)
Groupes : comp.lang.tclDate : 10. Jan 2025, 13:09:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlr2m4$775$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla Thunderbird
Harald,
thanks for the wiki page. It has definitely a lot of
information.
May be, you (or I can do that too) may add to the "Default encoding..."
paragraph, that in the long term it's best to encode ALL tcl source
files in utf-8 to get out of this "-encoding ..." hell.
Another thing that hurts me and is off-topic here (sorry):
The changed variable name resolution also affects itcl::class
defintions. The following leads to an error:
::itcl::class A {
public common tclVersion $tcl_version
}
Because the ::itcl::class commands open a namespace, the resolution
of the global variable tcl_version doesn't succeed. You
have to use the complete path $::tcl_version.
Best wishes
Uwe
Am 09.01.2025 um 10:40 schrieb Harald Oehlmann:
Am 09.01.2025 um 10:12 schrieb Uwe Schmitz:
Nevertheless, this point should be noted under "Important Incompatibilities in Tcl 9.0"
on the Tcl9 page:
https://www.tcl.tk/software/tcltk/9.0.html
Hi Uwe,
thanks for all your contributions.
Here is the wiki page for TCL script migration:
https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9&p
Please look to section "Default encoding for scripts is UTF-8".
The also mentioned migration tools by Ashok also check the codepage issue. You may consider to use those tools also to detect other incompatible changes.
https://github.com/apnadkarni/tcl9-migrate
I am happy to include any missing information to this page.
Thank you and take care,
Harald