View Ticket
Ticket Hash: 550d6360c9e6767f7c93fc3d70398091f3d7afb4
Title: Most demos not working with Tcl/Tk 9
Status: Open Type: Code Defect
Severity: Important Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2025-10-15 18:19:28
15.1 days ago
Created: 2025-10-13 15:12:29
17.2 days ago
Version Found In: 2.0b2
User Comments:
anonymous added on 2025-10-13 15:12:29:

Most demos are not working using Tcl/Tk 9.0.2 because of encoding problems. They work fine using Tcl/Tk 8.6.17.

Example read_blocking_webpage.tcl:

error reading "sock166e23c4e30": invalid or incomplete multibyte or wide character while executing "read $ch 4096" (procedure "read_blocking" line 18) invoked from within "read_blocking $host $port $path $protocol" invoked from within "save_file "read_blocking_webpage.txt" [read_blocking $host $port $path $protocol]" (file "read_blocking_webpage.tcl" line 65)


bohagan added on 2025-10-13 20:59:30:

I just tried them with TCL 9.0.2 on MS Windows and they worked. Maybe it needs the channel -profile option too.


bohagan added on 2025-10-13 23:56:39:

I also tried on OpenSuSE Linux Leap 16.0 with 8.6.17 and 9.0.2 and no issues. What OS and version are you using?


anonymous added on 2025-10-15 18:19:28:

The errors occur on ex. Windows11, Debian 12.6 and SuseLeap 15.6.

If changing the following line in demo read_blocking_website.tcl

chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf}

to

chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf} -profile tcl8

the demo works on above mentioned systems using Tcl 9.0.2 and tls2.0b2.