LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.07k stars 481 forks source link

Doesn't work with TightVNC's UTF-8 clipboard support #592

Open felixonmars opened 10 months ago

felixonmars commented 10 months ago

Describe the bug When connecting to a TightVNC server, clipboard sync is still in latin-1 and ends up with question marks or garbage text.

To Reproduce Connect to a TightVNC server, and try to copy unicode text from or to the remote device.

Expected Behavior Unicode text remains the same across clipboards.

Logs/Backtraces n/a

Your environment (please complete the following information):

Additional context TightVNC supports UTF-8 since version 2.8.53. Copied from its changelog:

Added support for Unicode clipboard transfers (UTF-8). The latest public version of the standard RFB protocol (3.8) does not support Unicode text, so we implemented this via a new TightVNC protocol extension. This feature will work when supported at both ends of the connection.

So probably an additional protocol extension is needed for this?

I have looked through its source code and found something that should be related:

2023-08-28-22-11-57
layercak3 commented 1 month ago

libvncserver and tigervnc implements the Extended Clipboard pseudo-encoding (from UltraVNC in 2010) which supports UTF-8. It looks like tightvnc has introduced yet another cut-text protocol. The Extended Clipboard pseudo-encoding does not introduce new client/server message numbers like in the screenshot, but instead modifies the behaviour of 3/6.

bk138 commented 1 week ago

Hi @felixonmars, does #561 change/fix this for you?