|
From: Poor Y. <org...@po...> - 2023-02-02 00:55:05
|
On 2023-02-01 22:46, Christian Gollwitzer wrote:
> Basically, what I would suggest is a way to configure the behaviour
> during the en/decoding and then, of course, set some sensible default -
> e.g. the same behaviour that Python uses, or Tcl8 - but leave it open
> for the future programmer to set the error handling to their liking. It
> may be application dependant, that's why "strict" and "nocomplain" etc.
> exist - just that I do not think one should hardcode those, especially
> with "weird" names that do not explain what is going on.
>
That was the motivation for the "trunk-encodingdefaultorig" and
"trunk-encodingdefaultstrict" branches, which are what I'd like to see
trunk
become. "-strict" is still there, but it just means what it does in
Python:
"Return an error if there is an encoding problem".
Here's another possibility for passing encoding options: Make the value
of
"-encoding" a list:
chan configure $chan -encoding {utf-8 strict ...}
To change options without changing the encoding:
chan configure $chan -encoding {{} strict ...}
--
Yorick
|