Artifacts Associated With Ticket 165b103962
Ticket change [19ffdb7432] (rid 199211) by oehhar on 2022-03-15 10:50:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Hi Jan, Don, thank you for your work on propper bytearrays. This is great work. May I ask for a change? Please make sure, that error messages only contain printable ASCII. You never know, what happens with error messages. They are written to the console, logs or data bases and are set over the network. Thus, arbitrary contents may lead to strange bugs. You never know the encoding of the target. Here is an example of current main branch, where *TclGetBytesFromObj* is called with the last argument of the following command. *TclGetBytesFromObj* generates this error message: <verbatim> % encoding convertfrom iso8859-1 \u0141 expected byte sequence but character 0 was 'Ł' (U+000141) </verbatim> See the "Ł" in the error message. I don't want to imagine what happens, if a non printable character is outputted. Thank you and take care, Harald
- foundin initialized to: "main"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "11. Conversions from String"
- title initialized to:
Error message of "TclGetBytesFromObj" may include arbitrary character
- type initialized to: "RFE"
Ticket change [db2a98bb6c] (rid 253910) by apnadkarni on 2026-05-25 16:38:24:
- icomment:
I agree with Harald. On encoding errors, I don't think we should attempt to print the failing bytes as characters. Question is what the message wording should be. Is the below acceptable to all. It would be nice to agree before changing the strings in the test cases! ``` % encoding convertfrom iso8859-1 \u0141 expected code point values below 0xff but value at byte offset 0 was 0x141 ```
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [1b4714b3df] (rid 253927) by oehhar on 2026-05-26 08:34:54:
- icomment:
Agree Thanks for caring, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [3046843c89] (rid 253957) by apnadkarni on 2026-05-27 03:39:14:
- closedate changed to: "2461187.6522455439"
- closer changed to: "apnadkarni"
- icomment: "Fixed in [fbd094029a]"
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"