On Thursday 08 of March 2012 18:01:14 cobines wrote:
> Hello.
> 
> Putting a string to a clipboard is done in TClipboard.SetAsText():
> 
>   SetBuffer(PredefinedClipboardFormat(pcfText),s[1],length(Value)+1);
> 
> Note that there is length(Value)+1, ending zero included. This comes
> from the following revision:
> 
> "r7259 | vincents | 2005-06-21 13:42:35 +0200 (wto) | 2 linie
> 
> copy terminating #0 to clipboard too, windows expects it."
> 
> But some programs on Linux treat this ending zero as part of the
> clipboard data. I also checked how a few non-Lazarus programs copy to

What programs treat terminator as part of data ?
from qt docs, #0 means eod afair (QMimeData).

> clipboard and they don't include ending zero. I don't think it is
> needed.

We cannot remove it just because you think so. If it's removed we need to test 
consequences on gtk, gtk2 and qt.


> 
> Can adding trailing zero be moved to the win32 widgetset only?

theoretically yes, if it won't disturb others.


zeljko
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to