[Lazarus] Setting clipboard on Linux adds ending #0
cobines at gmail.com
Sat Mar 10 16:17:35 CET 2012
2012/3/10 zeljko <zeljko at holobit.net>:
> ok, let's back at beginning ... what problem is caused by trailing null
> terminator under gtk2 ?
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
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).
More information about the Lazarus