Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plain text with char hex 0c (page-break-form-feed) different from behavior of xclip -> x-clipboard #237

Open
SimonGerm opened this issue Oct 24, 2024 · 4 comments
Labels
not our bug The issue is in some other piece of software involved

Comments

@SimonGerm
Copy link

Do the following:
generate a simple online text in libreoffice24.8.2.1-1.2,
export it as pdf (or print it with cups-pdf-printer)

from poppler tools use "pdftotext"
it will now have the char hex 0c at the end.
(behavior is same if its somewhere in middle of text)

do now:
in X-session:
textwith-0c -> xclip -> x-clipboard (ok, the text is shown in clipboard and could be pasted (mouse/middlebutton))

in wayland-session
textwith-0c -> wl-copy -> wayland-clipboard (did not show contens when 0c is used, not possible to paste (mouse/middlebutton))

i am not sure if this is a problem of wl-copy or the wayland clipboard itself.
when using wl-paste the contens will be outputted.
but its not show (maybe never arriving) in clipboard of the desktop
the enviorement: (plasma6.2.0-1.1 kdewayland6.2.0-1.1 all on opensuse tumbleweed 20241011)

workaround is to filter out the 0c of the textfile.

@SimonGerm
Copy link
Author

to clarify: mouse/middlebutton AND OR strg+v
it depends if using:
| xclip
| xclip -selection clipboard

wl-copy
wl-copy -p

@SimonGerm
Copy link
Author

here exact commands used:
x-session:
pdftotext -layout libreoffice-pdf.pdf - | xclip
pdftotext -layout libreoffice-pdf.pdf - | xclip -selection clipboard

wayland-session:
pdftotext -layout libreoffice-pdf.pdf - | wl-copy
pdftotext -layout libreoffice-pdf.pdf - | wl-copy -p

and working version:
pdftotext -layout "$1" - | sed -e 's/\x0c//g' | wl-copy
pdftotext -layout "$1" - | sed -e 's/\x0c//g' | wl-copy -p

@SimonGerm
Copy link
Author

filed also a bug to opensuse /kde-plasma:

https://bugzilla.opensuse.org/show_bug.cgi?id=1232228

@bugaevc
Copy link
Owner

bugaevc commented Oct 24, 2024

Hi, so if copying with wl-copy and subsequently pasting with wl-paste works, this means wl-copy succeeds in copying the 0c byte to the clipboard. So the issue must be then in whichever other way that you're accessing the "clipboard of the desktop".

@bugaevc bugaevc added the not our bug The issue is in some other piece of software involved label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not our bug The issue is in some other piece of software involved
Projects
None yet
Development

No branches or pull requests

2 participants