Skip to content
Tcl Source Code History Of Ticket 80d4c1c7e5393907
Login

History Of Ticket 80d4c1c7e5393907

Artifacts Associated With Ticket 80d4c1c7e5393907

  1. Ticket change [4736f5b7db] (rid 222069) by apnadkarni on 2024-02-06 11:38:47:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. 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?
      
    5. foundin initialized to: "9.0"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "44. UTF-8 Strings"
    15. title initialized to:
      Isolated surrogates are not replaced when encoding to / from utf-8
      
    16. type initialized to: "Bug"
  2. Ticket change [2500439b30] (rid 222070) by jan.nijtmans on 2024-02-06 12:18:45:

    1. 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
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [3339fafbd6] (rid 222071) by jan.nijtmans on 2024-02-06 12:30:54:

    1. icomment:
      
      Hmmmm. I now see the PROFILE_REPLACE handling just above that ...... I don't know why it's not working as expected then.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [763b0c84f0] (rid 222078) by jan.nijtmans on 2024-02-06 13:03:41:

    1. assignee changed to: "apnadkarni"
    2. 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?
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  5. Ticket change [6f1c99cea5] (rid 222079) by apnadkarni on 2024-02-06 13:15:28:

    1. icomment:
      Fix seems reasonable. If you commit it, I'll the test cases.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  6. Ticket change [5d1deab796] (rid 222080) by jan.nijtmans on 2024-02-06 13:22:55:

    1. icomment: "Committed now"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  7. Ticket change [80a06ba234] (rid 222082) by jan.nijtmans on 2024-02-06 13:23:58:

    1. login: "jan.nijtmans"
    2. mimetype: "text/plain"
    3. resolution changed to: "Fixed"
    4. status changed to: "Pending"
  8. Ticket change [abdf6c0c39] (rid 222115) by apnadkarni on 2024-02-07 03:09:46:

    1. closedate changed to: "2460347.63178997"
    2. closer changed to: "apnadkarni"
    3. icomment: "Added tests. Closing."
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"