Overview
| Artifact ID: | a6fe29fc1a83595dd17c74c1b55a813176cf5d303a69bf05e52147504dbd1eb5 |
|---|---|
| Ticket: | 945d2387d7234f63c9df461e36af02b9729ce941
Tcl_ExternalToUtf hangs on valid input if character limit is specified |
| User & Date: | apnadkarni on 2024-08-20 11:08:50 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
Note the test below can only be run with **tcltest** since it makes use of the testencoding command which is a direct call into Tcl_ExternalToUtf. The `encoding` command cannot reproduce this at script level because it has no means of specifying a character limit. The Tcl channel system internally does make use of the character limit but formulating an exact case is difficult because triggering the bug depends on specification of a character limit AND remaining space in the destination decode buffer (not the channel buffer), neither of which can be directly controlled at script level. I'll continue to try constructing an appropriate buffering and read sequence. In the meanwhile, here is the failure case. ``` % set utf16 [encoding convertto utf-16le A\U1F600B] A=ØÞB % testencoding Tcl_ExternalToUtf utf-16le $utf16 {start end} 0 40 nread nwrote ok 0 AðBÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ % set charlimit 2 2 % testencoding Tcl_ExternalToUtf utf-16le $utf16 {start end charlimit} 0 40 nread nwrote charlimit ...hangs... ``` Note above, the hang only occurs if the charlimit flag (`TCL_ENCODING_CHAR_LIMIT` in C) is specified - foundin changed to: "9.0b3"
- is_private changed to: "0"
- login: "apnadkarni"
- priority changed to: "5 Medium"
- private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "apnadkarni"
- subsystem changed to: "- New Builtin Commands"
- title changed to:
Tcl_ExternalToUtf hangs on valid input if character limit is specified
- type changed to: "Bug"