Artifacts Associated With Ticket 80d4c1c7e5
Ticket change [4736f5b7db] (rid 222069) by apnadkarni on 2024-02-06 11:38:47:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
Isolated (unpaired) surrogates should be treated as encoding errors. Example: ``` % binary encode hex [encoding convertto -profile strict utf-8 \UD800] unexpected character at index 0: 'U+00D800' ``` The above is correct as U+D800 should not appear as an isolated surrogate code point. However the following is not, ``` % binary encode hex [encoding convertto -profile replace utf-8 \UD800] eda080 ``` eda080 is the utf-8 for U+D800. The output have been efbfbd (U+FFFD replacement char). In principle, any time the strict profile raises an error, the replace profile should be substituting the replacement character. Jan, your thoughts?
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to:
Isolated surrogates are not replaced when encoding to / from utf-8
- type initialized to: "Bug"
Ticket change [2500439b30] (rid 222070) by jan.nijtmans on 2024-02-06 12:18:45:
- icomment:
It looks like you forgot the "-profile replace" handling here: [https://core.tcl-lang.org/tcl/file?name=generic/tclEncoding.c&ci=f1cef9d6c96f7ce5&ln=2595-2607] Agreed
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [3339fafbd6] (rid 222071) by jan.nijtmans on 2024-02-06 12:30:54:
- icomment:
Hmmmm. I now see the PROFILE_REPLACE handling just above that ...... I don't know why it's not working as expected then.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [763b0c84f0] (rid 222078) by jan.nijtmans on 2024-02-06 13:03:41:
- assignee changed to: "apnadkarni"
- icomment:
Proposed fix [c37652549ee69fa2|here] In 8.7 it appears to work as expected, but in 9.0 "-profile replace" handling was lacking for this specific case. Do you want to add a testcase?
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [6f1c99cea5] (rid 222079) by apnadkarni on 2024-02-06 13:15:28:
- icomment:
Fix seems reasonable. If you commit it, I'll the test cases.
- login: "apnadkarni"
- mimetype: "text/plain"
- icomment:
Ticket change [5d1deab796] (rid 222080) by jan.nijtmans on 2024-02-06 13:22:55:
- icomment: "Committed now"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [80a06ba234] (rid 222082) by jan.nijtmans on 2024-02-06 13:23:58:
- login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Pending"
Ticket change [abdf6c0c39] (rid 222115) by apnadkarni on 2024-02-07 03:09:46:
- closedate changed to: "2460347.63178997"
- closer changed to: "apnadkarni"
- icomment: "Added tests. Closing."
- login: "apnadkarni"
- mimetype: "text/plain"
- status changed to: "Closed"