Artifacts Associated With Ticket 821620d417f604c4
Ticket change [b29857c701] (rid 209153) by apnadkarni on 2023-02-25 04:56:26:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
In Tcl 8.7, ``` % package require Tcl 8.7a6 % codepoints [encoding convertfrom utf-8 [binary decode hex EDAFBFEDBFBF]] U+10FFFF ``` In Tcl 9, ``` % package require Tcl 9.0a4 % codepoints [encoding convertfrom utf-8 [binary decode hex EDAFBFEDBFBF]] U+00DBFF U+00DFFF ``` Surrogate pairs are not allowed in strict utf-8 but the above is not strict. In my opinion, the Tcl 8.7 behavior is preferable but since this is non-conformant anyways, either behavior might be ok. But they should be consistent between Tcl 8 and 9.
- foundin initialized to: "8.7"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to:
Different handling of surrogates in utf-8 between Tcl8 and Tcl9
- type initialized to: "Bug"
Ticket change [2f2280c288] (rid 209279) by jan.nijtmans on 2023-02-26 22:04:44:
- assignee changed to: "jan.nijtmans"
- icomment:
This change is explained in TIP #619: [https://core.tcl-lang.org/tips/doc/trunk/tip/619.md] Tcl 8.6/8.7 always combines surrogates when it encounters a pair. This is wrong, since it makes the "string length" inconsistant: Glueing two strings together with length 1 (an Upper and a Lower surrogate) results in a new string with length 1. Because Tcl 8.7 uses 3 different internal representations (UTF-8, UTF-16 and UTF-32), and can freely switch between them, there's no way to distinguish a surrogate-pair and a code-point > U+FFFF. In Tcl 9.0, Surrogates are never joined, so a round-trip between utf-8 -> utf-32 ->utf-8 is losless. That's the intention of TIP #619. See also [https://core.tcl-lang.org/tcl/tktview?name=0d61d3a2bb], which contains the discussion which lead to exactly this change.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Invalid"
- status changed to: "Pending"
Ticket change [6b34fa074d] (rid 209288) by apnadkarni on 2023-02-27 09:49:15:
- icomment: "Ok, thanks. I'll adapt the test cases accordingly."
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [d22a7e3f05] (rid 209308) by jan.nijtmans on 2023-02-27 20:54:43:
- closedate changed to: "2460003.3713358"
- closer changed to: "jan.nijtmans"
- login: "jan.nijtmans"
- mimetype: "text/plain"
- status changed to: "Closed"