| Ticket UUID: | d7fd37ebd9e64d1a33a8a586dc439fe85a19085 | ||
| Title: | handling leftover prefix in table encoding | ||
| Type: | Bug | Created on: | 2023-03-19 21:42:19 |
| Submitter: | jan.nijtmans | Assigned to: | jan.nijtmans |
| Subsystem: | 16. Commands A-H | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2023-03-20 13:27:33 |
| Status: | Closed | Closed by: | apnadkarni |
| Resolution: | Fixed | Closed on: | 2023-03-20 13:27:33 |
| Version: | 8.7 | ||
| Description: | ||||
|
Example: $ tclsh8.6 % string length [encoding convertfrom shiftjis \x82] 0 Most encodings in Tcl 8.6 just pass through left-over bytes as-is. This one is different. So, what should we do here? In the current Tcl 8.7 code, Ashok wrote: * TODO - this is broken. For consistency with other * decoders, an error should be raised only if strict. * However, doing that check cause a whole bunch of test * failures. Need to verify if those tests are in fact * correct. */ That's exactly what this ticket is about. | ||||
| User Comments: | ||||
jan.nijtmans added on 2023-03-19 21:54:19:
Possible fix [7a99ab87acce53a2|here]. @Ashok, what do you think? I only see a single test result changing, exactly as I would expect. apnadkarni added on 2023-03-20 02:14:44:
Fix seems reasonable to me. /Ashok jan.nijtmans added on 2023-03-20 12:01:09:
Fixed [a1180af031a0e7a6|here]. Thinking more, it's probably better to silently remove the prefix character for the "tcl8" profile, as is done in Tcl 8.6. apnadkarni added on 2023-03-20 13:27:33:
Given there is no "correct" behavior for this profile, I agree tcl8 compatibility is preferable. | ||||
