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

Clipboard content changes to Chinese characters #36

Closed
stintel opened this issue May 20, 2022 · 6 comments
Closed

Clipboard content changes to Chinese characters #36

stintel opened this issue May 20, 2022 · 6 comments

Comments

@stintel
Copy link

stintel commented May 20, 2022

Running barrier 2.4.0 server on Gentoo KDE Plasma and Waynergy 855ea2a on Fedora 36 KDE Plasma, clipboard content copied on Gentoo changes to Chinese characters once I move the cursor from Gentoo to Fedora.

image
image

It does not happen when I copy text from Kate, so I initially suspected it's font related. However, the font I'm using in Konsole on Gentoo is Droid Sans Mono, which is also installed on the Fedora machine. Simply moving the cursor from the Gentoo host to the Fedora host and moving it back, is enough to alter the clipboard content.

The problem does not seem to occur when I'm copying text on the Fedora machine and paste it on the Gentoo machine.

This problem does not occur between the same Barrier server and a Barrier client on macOS, so I suspect this is a Waynergy issue.

Would appreciate any suggestions as right now I always have to copy text in app X, paste in Kate, copy again in Kate, then paste on the Fedora machine. Easy to forget and extremely frustrating when you do.

@r-c-f
Copy link
Owner

r-c-f commented Jun 28, 2022

I apologize for the delay...

This seems to be a weird one that I can't quite reproduce at first pass but I'll have a go with Plasma and Konsole in the near future. In the meantime, is there any way you could past the proper text and then the garbled text here? I'd want to see if there is some trivial misinterpration, or something much more broken going on.

@stintel
Copy link
Author

stintel commented Jun 28, 2022

I apologize for the delay...

No worries, life happens to all of us ;-)

This seems to be a weird one that I can't quite reproduce at first pass but I'll have a go with Plasma and Konsole in the near future. In the meantime, is there any way you could past the proper text and then the garbled text here? I'd want to see if there is some trivial misinterpration, or something much more broken going on.

Copying foo or bar in Konsole on the Gentoo barrier server and pasting it on the Fedora running Waynergy client results in 猼慰瑳汹㵥昢湯⵴慦業祬洺湯獯慰散㸢猼慰瑳汹㵥挢汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲昣晦晦㭦㸢潦㱯猯慰㹮戼㹲⼼灳湡.

I accidentally Googled that recently, and found debauchee/barrier#406 - it seems to be related to UTF-8.

@r-c-f
Copy link
Owner

r-c-f commented Jun 28, 2022

That's actually extremely useful; it seems to mostly resemble an imprudent attempt at reading UTF-8 as if it were UTF-16 when playing with iconv. Not sure how lossless that is going to be round trip but I've at least got some ideas to play with, so thank you.

@r-c-f
Copy link
Owner

r-c-f commented Jun 29, 2022

The solution seems to be to ignore anything but plain text to bypass the weird HTML conversion bugs as seen in the barrier issue. Does #39 fix it for you?

@stintel
Copy link
Author

stintel commented Jun 29, 2022

Does #39 fix it for you?

It does, thanks! Few nits on the PR though.

r-c-f added a commit that referenced this issue Jun 29, 2022
The ideal fix would be an upstream barrier fix for unicode, but for now
this will solve #36 by paying attention to format 0 (plain text) rather
than 1 (HTML).
r-c-f added a commit that referenced this issue Jun 29, 2022
The ideal fix would be an upstream barrier fix for unicode, but for now
this will solve #36 by paying attention to format 0 (plain text) rather
than 1 (HTML).
@r-c-f
Copy link
Owner

r-c-f commented Jun 29, 2022

Thank you again.

@r-c-f r-c-f closed this as completed Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants