home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 107,807 of 107,822   
   Maria Sophia to Lawrence 'Oliveiro   
   Re: PSA: Clipboard differences between C   
   15 Feb 26 20:43:00   
   
   XPost: alt.comp.software.firefox, comp.sys.mac.system   
   From: mariasophia@comprehension.com   
      
   Lawrence 'Oliveiro wrote:   
   > On Sun, 15 Feb 2026 07:54:11 -0500, Paul wrote:   
   >   
   >> There's no guarantee any clipboards softwares will even agree on   
   >> what is on the clipboard. Some of the clipboard items could be   
   >> automatic translations of things submitted by the sourcing   
   >> application.   
   >   
   > If the source application supplies a format for the Clipboard, it   
   > makes sense for any app examining the Clipboard to see that format.   
   >   
   >> And Wayland being a latecomer, of course it's going to have to do   
   >> weird shit, to get a name for itself.   
   >   
   > Feel free to reproduce my tests, in a suitable way, on a pure-X11,   
   > Wayland-free system, then, just to see what "weird shit" means.   
      
   Hi Lawrence,   
      
   I, for one, greatly admire and appreciate what Lawrence has done for the   
   team, especially as Apple, Linux and Firefox users are on this thread.   
      
   I ran NirSoft InsideClipboard on Windows today and saw the same pattern   
   that Lawrence showed on Linux. Chromium placed CF_TEXT, CF_UNICODETEXT,   
   CF_LOCALE, HTML Format, and two Chromium internal formats on the   
   clipboard. That matches his Linux results one for one, just expressed in   
   Windows clipboard terminology instead of MIME types   
      
   ==================================================   
   Format ID         : 1   
   Format Name       : CF_TEXT   
   Handle Type       : Memory   
   Size              : 244   
   Index             : 6   
   ==================================================   
      
   ==================================================   
   Format ID         : 7   
   Format Name       : CF_OEMTEXT   
   Handle Type       : Memory   
   Size              : 244   
   Index             : 7   
   ==================================================   
      
   ==================================================   
   Format ID         : 13   
   Format Name       : CF_UNICODETEXT   
   Handle Type       : Memory   
   Size              : 488   
   Index             : 2   
   ==================================================   
      
   ==================================================   
   Format ID         : 16   
   Format Name       : CF_LOCALE   
   Handle Type       : Memory   
   Size              : 4   
   Index             : 5   
   ==================================================   
      
   ==================================================   
   Format ID         : 49426   
   Format Name       : HTML Format   
   Handle Type       : Memory   
   Size              : 1,204   
   Index             : 1   
   ==================================================   
      
   ==================================================   
   Format ID         : 49661   
   Format Name       : Chromium internal source RFH token   
   Handle Type       : Memory   
   Size              : 24   
   Index             : 3   
   ==================================================   
      
   ==================================================   
   Format ID         : 49683   
   Format Name       : Chromium internal source URL   
   Handle Type       : Memory   
   Size              : 58   
   Index             : 4   
   ==================================================   
      
   What Lawrence didn't do, since he wasn't cleaning text and I am, is run it   
   through the Notepad++ macro, which puts things back on the clipboard.   
      
   This is the NirSoft InsideClipboard result after running Control+B   
   (which adds a space, deletes it, cleans the text, & repopulates the   
   clipboard with the cleaned text and wipes it off of N++ in 1 step).   
      
   ==================================================   
   Format ID         : 1   
   Format Name       : CF_TEXT   
   Handle Type       : Memory   
   Size              : 330   
   Index             : 3   
   ==================================================   
      
   ==================================================   
   Format ID         : 7   
   Format Name       : CF_OEMTEXT   
   Handle Type       : Memory   
   Size              : 330   
   Index             : 4   
   ==================================================   
      
   ==================================================   
   Format ID         : 13   
   Format Name       : CF_UNICODETEXT   
   Handle Type       : Memory   
   Size              : 660   
   Index             : 1   
   ==================================================   
      
   ==================================================   
   Format ID         : 16   
   Format Name       : CF_LOCALE   
   Handle Type       : Memory   
   Size              : 4   
   Index             : 2   
   ==================================================   
      
   I have no idea, just yet, what that means in detail, but it seems to show   
   a. Chromium always puts plain text formats on the clipboard.   
   b. Chromium always puts HTML Format on the clipboard.   
   c. Chromium always puts its internal metadata formats on the clipboard.   
      CF_TEXT   
      CF_OEMTEXT   
      CF_UNICODETEXT   
      CF_LOCALE   
      HTML Format   
      Chromium internal source RFH token   
      Chromium internal source URL   
      
   This appears to match Lawrence's Linux results one for one.   
   Hence, I believe it confirms the Chromium part of the PSA.   
      
   While the Notepad++ macro is really part of a separate Windows thread, we   
   note here that after the CTRL+B macro ran, the clipboard contained only:   
      CF_TEXT   
      CF_OEMTEXT   
      CF_UNICODETEXT   
      CF_LOCALE   
      
   The control+b macro stripped out all non text formats, including:   
      HTML Format   
      Chromium internal formats   
   This means the shortcuts.xml macro is not only cleaning the text.   
   It is also replacing the clipboard contents with a new, plain-text-only   
   clipboard (since everything we do is always tuned to a single step).   
      
   That new clipboard no longer contains the HTML Fragment land mine.   
   This explains how and why the Notepad++ macro fixes the problem.   
      
   In summary,   
    a. Chromium puts HTML Format on the clipboard.   
    b. Notepad++ sees that HTML Format exists.   
    c. Even though Notepad++ requests plain text, the presence of   
       that HTML Format changes how the paste is interpreted.   
    d. Which breaks Ctrl+A.   
      
   The macro wipes the clipboard and replaces it with plain text only.   
   Once the HTML Format is gone, Ctrl+A works again. Voila!   
      
   The macro fixes the problem because it removes the HTML Format block by   
   rewriting the clipboard, which is exactly the invisible land mine described   
   in the PSA's original post.   
      
   Without everyone's help, particularly that of Lawrence, Paul & Carlos, I   
   never would have gotten this far in testing and explaining how it works.   
   --   
   My brain is wired for Occam's Razor, but to be always 100% logically   
   correct, I need to have as many facts as I can to fit into the picture.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca