Overview
| Artifact ID: | 0a0c97356e0f73922c25da4a37896c7adfb3963d31776d8b33a2d96a9cdf8d52 |
|---|---|
| Ticket: | 28de50dcee4f6888eaed987bf1d795ac67138b5f
Crash on invalid Unicode code points |
| User & Date: | jan.nijtmans on 2026-11-25 15:49:11 |
Changes
- closedate changed to: "2461370.1591664697"
- closer changed to: "jan.nijtmans"
- icomment:
> I don't get it. Tcl_UniCharToUtf takes a 32-bit Unichar and outputs UTF-8 No, this function takes an _Unichar_. But an unichar could be 16-bit (in Tcl 8.6, in Tcl 9.0 with TCL_UTF_MAX=3 or with TCL_COMBINE) or 32-bit. You don't like the double functionality of this single function, noted! The only difference between those 2 is the handling of surrogates: with TCL_COMINE they are combined, without the flag they are handled as if they were 0xFFFD. As I said, the only way out is a new Tcl_Char16ToUtf() function, which functions as an UTF-16 -> UTF-8 converter one character (or surrogate) at a time.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"