|
2026-10-22
| ||
| 17:19 | • Ticket [0df5906dd7] Error-handling when stderr is in "strict" profile<... artifact: 7d7a05ed53 user: serhiy.storchaka | |
|
2026-10-15
| ||
| 11:39 | • Closed ticket [0df5906dd7]. artifact: 63b46ed7b1 user: serhiy.storchaka | |
|
2024-08-22
| ||
| 17:24 | Merge [a61dbb7ee6290dd1]: Fix [0df5906dd7]: Error-handling when stderr is in "strict" profile. check-in: b7b93ebbca user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE | |
|
2023-09-28
| ||
| 18:20 | • Pending ticket [0df5906dd7]: Error-handling when stderr is in "strict"... artifact: da9195e9cb user: jan.nijtmans | |
| 18:17 | Fix [0df5906dd7]: Error-handling when stderr is in "strict" profile check-in: 166b00eb0c user: jan.nijtmans tags: core-8-branch | |
| 18:16 | • Ticket [0df5906dd7] Error-handling when stderr is in "strict" profile<... artifact: efc178f187 user: jan.nijtmans | |
| 16:25 | • Ticket [0df5906dd7]: 3 changes artifact: babe275893 user: apnadkarni | |
| 15:26 | • Ticket [0df5906dd7]: 3 changes artifact: 272d180a0f user: jan.nijtmans | |
| 15:23 | Proposed fix for [0df5906dd7] check-in: 6314825ea9 user: jan.nijtmans tags: bug-0df5906dd7 | |
| 15:18 | • New ticket [0df5906dd7] Error-handling when stderr is in "strict" prof... artifact: ffa0e55ca1 user: jan.nijtmans | |
Error-handling when stderr is in "strict" profile
Example: <pre> $ tclsh8.7 % fconfigure stderr -profile strict % set env(abc\ud800) can't read "env(abc % </pre> The expected output would be something like: <pre> % set env(abc\ud800) can't read "env(abc\ud800)": no such variable </pre> But, what happens is that \ud800 is an illegal character in the strict profile, so the stderr output is truncated there. At least, the stderr output should indicate what's going on here
b7b93ebbcaMerge [a61dbb7ee6290dd1]: Fix [0df5906dd7]: Error-handling when stderr is in "strict" profile. check-in2024-08-22 17:24:30166b00eb0cFix [0df5906dd7]: Error-handling when stderr is in "strict" profile check-in2023-09-28 18:17:276314825ea9Proposed fix for [0df5906dd7] check-in2023-09-28 15:23:51
Proposed fix [here]
For troubleshooting purposes I think it is important to get as much of the text written out as possible. If all one sees is encoding error in stderr, it is completely unhelpful.
I would propose that stderr use the REPLACE (my preference) or (TCL8) profile even in strict mode.
Of course this can be configured by applications at startup but since it is the preferred behavior in my estimation, it should be made the default (for stderr).
Thanks, Ashok, I was thinking in about the same way. So TIP #657 needs to be modified, adding the "stderr" channel as an exception: "stderr" will be opened "-profile replace" by default (my preference too).
Still, if someone sets "stderr" to strict profile, the channel should do as expected ..... adding *encoding error in stderr* is - at the very least - an improvement over how it is now.
The handling in ::tcl::Bgerror has the same problem.
Fixed by [166b00eb0c]; stderr now also defaults to -profile replace as in TIP 657. Released in 9.0.0.