Broken out from bug 8427 comment #9. Contents stored in the STRING target has to be Latin-1 encoded [1]. It looks like FLTK doesn't validate that contents stored in the STRING target are Latin-1 encoded (it should be responsible for converting UTF-8 <-> Latin-1). This means that applications that put Latin-1 strings into the clipboard on the client side won't be able to get pasted correctly inside the session. This is probably not a common issue in practice, as most of the world uses UTF8_STRING anyway. [1] https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html
It seems not just FLTK suffers from this bug. GTK, Qt5 and Chrome all also have the issue. Qt6 and xterm implement things according to the specification, though. In the case of GTK, it does indeed seem to be a bug somewhere. I can find code in gdkselection-x11.c that checks if the type is STRING, and if so, converts from latin-1 to UTF-8. For some reason, that code isn't working correctly.