[Lazarus] Setting clipboard on Linux adds ending #0

zeljko zeljko at holobit.net
Sat Mar 10 18:05:28 CET 2012

On Saturday 10 of March 2012 16:17:35 cobines wrote:
> 2012/3/10 zeljko <zeljko at holobit.net>:
> > ok, let's back at beginning ... what problem is caused by trailing null
> > terminator under gtk2 ?
> When assigning
>   Clipboard.AsText := '1234';
> and pasting to some programs (I only experience it with jEdit though),
> '1234'#0 is pasted, i.e., string of length 5 instead of length 4.
> It can be treated as:
> a) a bug in LCL; why add #0 when '1234' was assigned, not '1234'#0. If
> it is required by some widgetset then add trailing zero in the
> widgetset;
> b) a bug in LCLGTK2; regardless of what LCL does, programs in GTK2 (or
> rather Linux programs, since LCLQT also strips the #0) should not put
> trailing #0 to the clipboard;
> c) a bug in the program that doesn't strip the trailing zero when
> pasting from clipboard (in this case jEdit).

If there's no problem when you paste it to gedit or to kwrite or to firefox 
then I'll vote for C). So then new question raises: Shell we fix Jedit bugs by 
fixing lcl ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120310/c66ec1ae/attachment-0003.html>

More information about the Lazarus mailing list