Tcl Source Code

View Ticket
Login
Ticket UUID: 63325009a85c176310f2ee2cc3a2ba22cf442a7b
Title: \u0400 conversion to and from cesu-8 fails.
Type: Bug Created on: 2024-09-13 18:43:13
Submitter: pooryorick Assigned to: jan.nijtmans
Subsystem: 11. Conversions from String Severity: Important
Priority: 5 Medium Last modified: 2024-09-19 10:42:26
Status: Closed Closed by: pooryorick
Resolution: Fixed Closed on: 2024-09-19 10:42:26
Version:
Description:

The following script,

set char \u0400
set converted [::encoding convertto cesu-8 $char]
set back [::encoding convertfrom cesu-8 $converted]

results in the error,

unexpected byte sequence starting at index 0: '\xE0'

User Comments:
jan.nijtmans added on 2024-09-13 21:21:37:

Fixed [310f98ad749150da|here]

Thanks!


pooryorick added on 2024-09-14 07:03:32:

The new test included in this fix converts to utf-8, not cesu-8. Is that intentional?


pooryorick added on 2024-09-19 09:15:07:

Shouldn't test "encoding-15.33" use cesu-8 instead of utf-8?


jan.nijtmans added on 2024-09-19 10:04:20:

It does use cesu-8


pooryorick added on 2024-09-19 10:42:26:

Got. I was looking at the original commit for the fix and didn't see the update. Thanks!