|
2024-08-31
| ||
| 07:25 | Merge [96e96a18653ce77b]: Fix [304d30677a] - CESU-8 decoding. check-in: 3e705a491b user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE | |
|
2024-08-22
| ||
| 10:04 | • Closed ticket [304d30677a]: CESU-8 decoding broken for non-BMP characters pl... artifact: c97c4779c1 user: apnadkarni | |
| 09:39 | Fix [304d30677a] - CESU-8 decoding check-in: 96e96a1865 user: apnadkarni tags: trunk, main | |
|
2024-08-20
| ||
| 13:12 | • Ticket [304d30677a] CESU-8 decoding broken for non-BMP characters status sti... artifact: 661cda849f user: jan.nijtmans | |
| 12:01 | • Ticket [304d30677a]: 3 changes artifact: c0dfae537f user: apnadkarni | |
|
2024-08-19
| ||
| 22:33 | • Ticket [304d30677a]: 3 changes artifact: 72ec69122d user: jan.nijtmans | |
| 18:19 | • Ticket [304d30677a]: 3 changes artifact: 958a994b3d user: juliannoble2 | |
|
2024-08-18
| ||
| 17:45 | Disable cesu tests because of bug [304d30677a] check-in: 8691b58034 user: apnadkarni tags: apn-more-encoding-tests | |
| 17:38 | • Ticket [304d30677a] CESU-8 decoding broken for non-BMP characters status sti... artifact: 5ccc8cf4fc user: apnadkarni | |
| 17:36 | Start on [304d30677a]. Passes test suite but needs clean up. But see comments below. It seems to me... check-in: 196cc3a439 user: apnadkarni tags: bug-304d30677a | |
| 17:15 | • New ticket [304d30677a] CESU-8 decoding broken for non-BMP characters. artifact: fd15760bc6 user: apnadkarni | |
CESU-8 decoding broken for non-BMP characters
Closed / Fixed304d30677a2cd621eb8a475804639ac04b2219c8Created 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-08-18 17:15:07
% encoding convertfrom cesu-8 [encoding convertto cesu-8 \U1f600]
unexpected byte sequence starting at index 0: '\xED'
Referenced by4
3e705a491bMerge [96e96a18653ce77b]: Fix [304d30677a] - CESU-8 decoding. check-in2024-08-31 07:25:3396e96a1865Fix [304d30677a] - CESU-8 decoding check-in2024-08-22 09:39:098691b58034Disable cesu tests because of bug [304d30677a] check-in2024-08-18 17:45:08196cc3a439Start on [304d30677a]. Passes test suite but needs clean up. But see comments below. It seems to me that the UtfToUtfProc function has jumped the shark and needs refactoring. While at one time, CESU-8 and UTF-8 could be combined into one function with minor differences, over the years the function has grown to of be completely unwieldy and difficult to understand/modify. The combination of UTF-8/CESU-8 x 3 profiles x flag combinations x possible invalid sequences is head-spinning. It really needs refactoring, possibly split into two or more functions, but I'm hesitant to do that before 9.0. check-in2024-08-18 17:36:14
apnadkarniplain2024-08-18 17:38:50
Proposed fix in [196cc3a439]. Still incomplete though passes current test suite. Needs a thorough review for correctness and possible simplification. But see the comments in the commit message.
juliannoble2plain2024-08-19 18:19:31
If this perhaps won't make it into Tcl 9 anyway - is there any consideration for handling the Java style cesu-8 which translates nul-bytes as 0xC0,0x80 ? Would this need to be a different encoding name such as cesu-8j or mutf-8? I'm not hassling for it - just wondering if this impacts the decision on whether to refactor parts of it as you mentioned.
jan.nijtmanswiki2024-08-19 22:33:04
Thanks, Ashok, for taking this.
I don't mind very much what exactly the CESU-8 encoding is doing. What does the CESU-8 encoding in ICU do with null-bytes? A separate mutf-8 encoding is a possibility, is it worth the effort?
apnadkarniplain2024-08-20 12:01:10
Given any consideration of modified utf8 (Java style) should not be considered for 9.0, the only immediate question to be answered is, whether the cesu-8 fix should be applied to trunk for inclusion into 9.0. I see two alternatives: 1. Include the fix as surrogates are the whole reason for cesu-8 existence and without the fix, there is no point including cesu-8. 2. Conversely, since cesu-8 is pointless without the fix, remove cesu-8 entirely from the code. From a code point of view, 2. is more surgical, less intrusive. But it is loss of functionality (there must have been a reason for including it) and probably requires a TIP. Jan, a lot depends on whether you have time to review the fix and are comfortable with the changes.
jan.nijtmanswiki2024-08-20 13:12:28
> Jan, a lot depends on whether you have time to review the fix and are comfortable with the changes.
I agree with your approach, using the channel state to control the generation of two separate surrogates. So, just go ahead.
apnadkarniplain2024-08-22 10:04:56
Fixed in [96e96a1865].
Log in (anonymous is fine) to add a comment.