symless / synergy-core

Open source core of Synergy, the cross-platform keyboard and mouse sharing tool (Windows, macOS, Linux)
https://symless.com/synergy
Other
10.2k stars 3.63k forks source link

Non-ASCII characters replaced with ? on client #6593

Open adamryczkowski opened 4 years ago

adamryczkowski commented 4 years ago

Server: Ubuntu 18.04 Client: Ubuntu 18.04

Synergy version 1.10.3-stable, protocol version 1.6 downloaded from current GitHub releases and compiled using libraries available in the Ubuntu repository.

Steps to Reproduce

Copy to clipboard text in a text editor on the server and try to paste it to gedit text editor opened on client.

Expected: Text should copy as-is Actual: Non-ASCII characters got replaced with ? on the client


I believe this is a serious bug, limiting core functionality for many (if not all) users.

The issue was discussed many times already (#316, #981, #1511, #1786, #4824, #4973, #6092) but never resolved fully. I hope this bug report sheds some light on the situation.

Thank you

adamryczkowski commented 4 years ago

Important update: Copying to/from some specific applications across screens actualy does work, in particular I was able to test it on VSCode (sudo snap install code) and in the Chromium browser.

Unfortunately, the majority of applications I tried does not receive the pasted Unicode string correctly; in particular: gedit, Libre Office Writer, terminator terminal emulator and Firefox.

I believe that you miss to forward some "this text is in Unicode" tag, which confuses the majority of applications. But you do copy the actual text right, and perhaps that is why the issue slipped through your QA.

HTH

nbolton commented 4 years ago

Fixed by #6617

NicolasGoeddel commented 4 years ago

Just tried the fix in version 1.11.1 between a Windows 10 and Ubuntu 19.10. And the issue persists. And it behaves exactly like @adamryczkowski mentioned it. I never used Chromium or VSCode together with Synergy. But I always use gedit, the terminal emulator, LibreOffice and Firefox to do my work. With Chromium and VSCode copy/paste works like a charm. So half of the solution is there.

Please reopen.

NicolasGoeddel commented 4 years ago

I just found out that the difference seems to be GTK2 vs. GTK3. With GTK2 the clipboard works flawlessly. But with GTK3 applications all non-ASCII characters will become a ?.

xenomachina commented 1 year ago

I'm curious to know why this issue is closed.

I've been having this issue for at least a year or two, and still have it today. This constantly bites me when I copy from Slack on my Mac (Synergy client) to my Linux box (Synergy server), as Slack has a tendency to replace certain ASCII characters with similar-looking Unicode characters (eg: quotes, apostrophes, and double-dashes).

I'm using 1.14.5.stable.a975f61a on both machines.

NicolasGoeddel commented 1 year ago

I'm curious to know why this issue is closed.

I've been having this issue for at least a year or two, and still have it today. This constantly bites me when I copy from Slack on my Mac (Synergy client) to my Linux box (Synergy server), as Slack has a tendency to replace certain ASCII characters with similar-looking Unicode characters (eg: quotes, apostrophes, and double-dashes).

I'm using 1.14.5.stable.a975f61a on both machines.

I switched from Synergy to Barrier since over a year now and it works better than Synergy in this regard.

desymless commented 1 year ago

Hi đź‘‹

Github issues that have a period of inactivity will be closed automatically (that happened in this case).

@xenomachina Would you mind sharing which ASCII characters tend to be replaced during copy/paste?

I should mention that we are planning to make significant fixes/changes to the copy-paste (and drag/drop) function in the coming months, hence any information that would help us reproduce and fix the bug would be very helpful.

xenomachina commented 1 year ago

@desymless They're non-ASCII characters.

In Slack, if I type:

"Fancy" quotes aren't copied properly

Slack turns it into:

“Fancy” quotes aren’t copied properly

This looks almost identical, but the two double-quote characters and the apostrophe have been turned into U+201c, U+201d, and U+2019, respectively.

If I then copy that message from Slack on my (Mac) client and paste on my (Linux) server I get:

?Fancy? quotes aren?t copied properly