Menu

#551 TCoolEdit: Text Block clipboard format is inconsistent

8
pending
1
2024-11-18
2023-09-09
No

TCoolTextWnd::TCoolTextWnd registers the clipboard format "CoolEdit Text Block". This custom format consists of text with a header tag of length IdSelSize (7) characters, which indicates the type of selection (stream, line or column). The remainder of the text is the actual selection.

However, the character type of this format is owl::tchar, hence depends on the character set build mode, which makes the clipboard format inconsistent. For example, two applications built with different character set modes will disagree on the format (ANSI vs Unicode UTF-16), which may lead to data corruption.

See TCoolTextWnd::SetDragData and TCoolTextWnd::TTextSelection::TextToClipboard.

The best solution seems to be to always use wide text (Unicode UTF-16) for this format.

Related

Bugs: #513
Bugs: #514
Bugs: #516
Discussion: CoolEdit issues
Discussion: CoolEdit issues
Feature Requests: #252
Wiki: OWLNext_Roadmap_and_Prereleases

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2023-09-10
    • status: open --> pending
    • assigned_to: Vidar Hasfjord
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2023-09-10

    This issue was fixed in [r6548] as suggested; the "CoolEdit Text Block" format is now always using wide text (Unicode UTF-16).

    After this and other recent fixes, the copy-and-paste functionality, including via drag-and-drop, seems to work well in CoolDemo now. Please review and test.

     

    Related

    Commit: [r6548]

  • Vidar Hasfjord

    Vidar Hasfjord - 2024-11-18
    • summary: CoolEdit Text Block clipboard format is inconsistent --> TCoolEdit: Text Block clipboard format is inconsistent
     

Log in to post a comment.