TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
746 stars 136 forks source link

clipboard UTF-8 support issue #375

Closed levinit closed 11 months ago

levinit commented 11 months ago

hi, I found the 3.0.9 release note mentions that the clipboard now supports UTF-8.

So I upgrade the server&viewer to 3.0.9, then launch a new session and connect it, but the text after pasting still garbled.

  1. I open vscode and create a new file with UTF-8 encoding on Windows(client), input 2 Chinese words: 你好 , then copy them

  2. paste on Linux (server), it shows ???+

113

Where am I not configured correctly? thx!

dcommander commented 11 months ago

This issue seems to be specific to Windows clients, as I cannot reproduce it on macOS. I will investigate.

dcommander commented 11 months ago

The issue seems to be that Java on Un*x and macOS uses UTF-8 text encoding by default, whereas Java/Windows uses a different text encoding (windows-1252) by default. You can temporarily work around the issue by setting JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 in the environment. I am looking into a more permanent fix.

dcommander commented 11 months ago

Should be fixed now.

levinit commented 11 months ago

The issue seems to be that Java on Un*x and macOS uses UTF-8 text encoding by default, whereas Java/Windows uses a different text encoding (windows-1252) by default. You can temporarily work around the issue by setting JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 in the environment. I am looking into a more permanent fix.

add env var, it works

dcommander commented 11 months ago

add env var, it works

OK. Did you try the actual fix? The new pre-release build should work without the environment variable.