Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Uwe Schmitz Newsgroups: comp.lang.tcl Subject: Re: Tcl9: source files are interpreted as utf-8 by default Date: Fri, 10 Jan 2025 13:09:39 +0100 Organization: A noiseless patient Spider Lines: 48 Message-ID: References: <20250107160810.07ddbbe6@lud1.home> <20250108113519.42eb3746@lud1.home> <20250108114254.7f56f049@lud1.home> <20250108124055.15c92a05@lud1.home> <20250108162339.7c04023e@lud1.home> <20250108202851.4dbb65c8@lud1.home> <20250109011516.7e3fc175@lud1.home> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 10 Jan 2025 13:09:40 +0100 (CET) Injection-Info: dont-email.me; posting-host="2fdf0259e12f5adb19d0b8b54e19d079"; logging-data="7397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hqfnIXjmZl+jpfeYXCCZFHa9nthWNx7o=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:a7hUbmO6M3CFWq3rxvZ7MtxeeSw= Content-Language: de-DE In-Reply-To: Bytes: 3146 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