|
From: <apn...@ya...> - 2023-02-02 17:11:02
|
Jan,
I’ve implemented the profile based scheme below (strict, tcl8, {}) in the https://core.tcl-lang.org/tcl/timeline?r=apn-encoding-profile branch.
As the diffs show, only the option parsing code is changed so risk is minimal. Internal flags and code is completely unchanged. That could use some refactoring when other profiles are added.
One (intentional) difference from the current core-8-branch behavior:
The existing 8.7 behavior allowed ambiguity when 2 arguments were provided to the encoding convert{from,to} commands whereby the first argument could be interpreted as either an option or encoding name. I don’t think this ambiguity is a good idea and moreover breaks 8.6 compatibility in a strict sense. In the new profile based implementation, there is no ambiguity as it is always treated as encoding name. This means if options are specified, the encoding name must be specified and cannot be defaulted. This is a Good Thing imo and makes the command both 8.6 compatible and less susceptible to programming errors.
Further, I am not sure of the interaction (for 8.7) or even the intent of the CHANNEL_ENCODING_NOCOMPLAIN flag to configure. It seems to have no effect except for some interaction with TCL_NO_DEPRECATE for reasons I don’t understand.
The tests are still being worked on.
If you are amenable to these changes, (I’d hope you are given your comments below) I’ll write up the TIP (or have Nathan adapt TIP 654) for 9.0
/Ashok
From: Jan Nijtmans <jan...@gm...>
Sent: Wednesday, February 1, 2023 9:23 PM
To: apn...@ya...
Cc: tcl...@li...
Subject: Re: [TCLCORE] Unicode in Tcl 9 - a commentary and critique
Op wo 1 feb. 2023 om 16:22 schreef apnmbx-public--- via Tcl-Core:
-profile strict -> flags for -strict
-profile “tcl8” -> implicit default flags
-profile nocomplain -> -nocomplain flags (although I would prefer just getting rid of this option)
Then I would suggest:
-profile strict -> flags for -strict
-profile tcl8 -> flags for -nocomplain (since this is the default for Tcl 8)
-profile {} -> no flags (default for Tcl 9)
(and fconfigure equivalents) be fairly straightforward?
Indeed
Regards,
Jan Nijtmans
|