Overview
| Artifact ID: | 9e55f7cdaf5b33654b467e369ca70be005ea5c940d8fe1a86b02528f5915e6b3 |
|---|---|
| Ticket: | d10d6ddf295864389294b966163a23a58b9a1e72
UTF-16 Unicode escapes should continue to work in version 9.0 |
| User & Date: | jan.nijtmans on 2024-08-22 11:32:48 |
Changes
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460544.98112002"
- closer changed to: "jan.nijtmans"
- icomment:
> @bhaible, one more time, parsing of u syntax has not changed between Tcl 8.6 (any patchlevel) and Tcl 9 What changed in Tcl 9 is the "UtfToUtf" encoding used when inputting or outputting utf-8. This functions is assumed to convert invalid utf-8 to valid utf-8 whenever possible. That also means that surrogate pairs are combined when written to stdout. Tcl 9 doesn't do that any more, which means that the surrogate pairs are kept as-is, and (due to the 'strict' profile) result in an exception. So, indeed, the parsing didn't change between 8.6 and 9.0. It's the output conversion which joins the surrogates, and - therefore - appears to do the right thing in 8.6. My advice: Handle it like [https://core.tcl-lang.org/tk/file?udc=1&ln=135-140&ci=c40f927d8d513464&name=library%2Fdemos%2Funicodeout.tcl|this]
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"