|
2023-03-24
| ||
| 21:43 | • Closed ticket [27c033c4a6]: Differences in default operation of encoding between... artifact: f8864daa3f user: jan.nijtmans | |
|
2023-02-25
| ||
| 06:12 | • Ticket [27c033c4a6]: 3 changes artifact: 620677788a user: apnadkarni | |
| 05:36 | • New ticket [27c033c4a6]. artifact: 469ee75be5 user: apnadkarni | |
Differences in default operation of encoding between Tcl 8 and 9
Closed / Fixed27c033c4a60a5124c5a593d164ba4d63a7ba3c66Created 4 years agoUpdated 4 years ago
Descriptionmarkdown2023-02-25 05:36:23
There is an ongoing debate over the default encoding mode (strict etc.) for Tcl 9. A reasonable argument can be made that compatibility overrides conformance. However, if that is the case the default operation must remain the same between Tcl 8 and 9 with no differences. Consider
% package require Tcl
8.7a6
% binary encode hex [encoding convertto jis0208 \\]
2129
versus
% package require Tcl
9.0a4
% binary encode hex [encoding convertto jis0208 \\]
unexpected character at index 0: 'U+00005C'
My belief is this is by design, not a bug, in that on output (as opposed to input) unless -nocomplain is specified an error is raised for the above.
This is not compatible behavior. If an argument is being made to maintain compatibility by default, Tcl 9 should remain compatible with Tcl 8 in the above case.
/Ashok
apnadkarniplain2023-02-25 06:12:14
Related to the above is http test 7.4.1 which in Tcl 9 expects an error to be generated when configured encoding does not support the character. Again, either the claim should be full compatibility or conformance. Right now, it seems to be somewhere in-between, apparently compatibility on input, conformance on output. Not reasonable in my opinion.
jan.nijtmanswiki2023-03-24 21:43:20
This is fixed as part of TIP #656, which makes the default encoding for both Tcl 8.7 and 9.0 "tcl8". So, this ticket can be closed.
Log in (anonymous is fine) to add a comment.