-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
[Bug]: Clipboard doesn't work for Chinese characters #121
Comments
DISCOVERY: "∆" (or any symbol) on Gboard sends to remote properly but not when it is being pasted into AVNC when copied from another text editor. These symbols work too: √π÷׶£¢€¥^ I think that all symbols work when being typed. So possibly Chinese chars too (can't test because I can't open Chinese keyboard in AVNC) |
Yeah, this is expected. Core RFB protocol only supports Latin-1 character set for clipboard sharing. See https://www.rfc-editor.org/rfc/rfc6143#page-19 for the spec. There is an extension to support other encodings, but I haven't looked at how well it is implemented. |
To follow. |
Any updates? |
This is not a bug in AVNC. Unicode support needs to implemented in LibVNCClient first. Then AVNC will be able to utilize it. |
LibVNC/libvncserver#399 has this already been implemented? |
@gujjwal00 hi, first of all thank you for great vnc viewer! fast/UX friendly, keep up the good work! i have same issue using avnc viewer app + tigervnc server (v1.10.1-31) setup. Send legacy events is enabled. Do i understand it right that it will work with version 1.10.10 and up? (LibVNC/libvncserver#399) (or maybe it should be updated to 1.12.0 cause release says I mean will this 'unicode bridge' on tigervnc server side be enough to make non-english copy pate work with avnc client? |
@babaric-dev @Neustradamus any of you guys using tigervnc by the chance? were you able to fix the issue by updating to latest version? |
Hi @gety9, I am glad to know you like AVNC. The LibVNCServer issue you are referring has added only server-side support. So any VNC server built using LibVNCServer can take advantage of it. Client-side support still needs to be implemented in LibVNCClient, before AVNC can use it. And just like server-side, someone will have to implement it. All I can say is when I have some free time, I will look into it. |
@gujjwal00 Gaurav, thx for quick reply
Could you please explain (to vnc newbie):
|
@gety9 I am using Xtigervnc (1.12.0) |
Yes, AVNC uses LibVNCClient to handle VNC protocol. And it seems that someone is already working to add support for Unicode clipboard.
This setting does not affect copy/paste. It only affects 'typing' non-English characters in some situations. |
So this issue will be automatically fixed if the PR there is merged? |
@gujjwal00 thx for explanation, now all is clear. |
@gujjwal00 Gaurav, could you please look into this issue? I know you are doing this in your free time, and appreciate all you done - it's just that this issue is VERY uncomfortable for foreign alphabet users (and there are many of use amoun avnc users) |
@gujjwal00 I think they added utf8 support in these 2 days (not sure). Please look into it. |
Can all of you please test this APK: app-debug.zip I am looking for the following details:
If you use more than one servers, please test with each one. |
AVNC shows disconnected message when entering the VNC viewer if server does not support all characters. Only occurs when text contains unicode characters:
but not when using ASCII characters:
Host: Termux (Android 7 variant) |
However, all works well with a server that does support all characters. Host: Ubuntu 22.04 LTS |
We just need to fix servers that do not support Unicode. Then it's perfect. |
Please attach the logs from AVNC and TigerVNC (if possible). |
Nevermind, I figured out the issue with 1.10.0. It is the same bug I found in UltraVNC yesterday (ultravnc/UltraVNC#74). TigerVNC v1.11+ should work correctly. |
Any handle for this bug so the viewer doesn't disconnected straight away? |
I am not sure how to avoid it, other than disabling clipboard sharing. |
Then add a toggle (default disabled) for extending clipboard support? Not sure is this possible though. |
It is possible, but I am trying to avoid that. |
Yes.
Please try out the example. It only crashed when Chinese text. |
I tried, but v1.10 crashes with both samples for me. |
Oh yeah, right. Sorry for my mistake. Brain must have stopped working at that moment. |
Thanks for the Z_STREAM patch |
host termux getting insta disconnect on the app-debug.zip (regular app connects fine). Obviously i can't test copy paste, input is set to regular english. Do i understand it right that i need to ask termux guys to update tigervnc to 1.11? |
Nope. Impossible. |
@babaric-dev so what's the solution? why it works for xtkoba on 1.10.1-31 and not for us with 1.10.1-34? He is saying it should work |
Because their VNC client also has a bug 😀. There are two bugs at play here: First, some servers don't handle zlib streams (used to compress clipboard data) correctly, leading to server crash. Second, some clients don't create zlib streams correctly, thus avoiding the server bug. This is probably why the server bug went unnoticed for so long, and now it has turned into a "feature" 😂. |
So any proposed solution? |
i think xtkoba implemented the patch in 1.10.1-35 |
This enable UTF-8 encoded clipboard sharing. Re: #121
This enables UTF-8 encoded clipboard sharing. Re: #121
Is extended clipboard available now? Looking forward to next release. |
Yes, and v2.2.0 is now available. I have have included a patch to emulate behavior of other clients for now. All servers I tested had this bug, because base code was same. So v2.2.0 should work with all servers which support extended clipboard. If you encounter an issue, please let me know. |
UltraVNC 1.4.0.9 has a fix, can you look it and confirm that it is solved with 2.2.0? |
@gujjwal00 Is AVNC 2.2.0 available on Fdroid and Google Play Store? Both are still 2.1.2. |
F-Droid takes couple of days to build it, while Play Store is rolling out incrementally. |
did you find a way to make it work on termux? |
It's working now, at least on Termux proot-distro |
works on my end too @gujjwal00 Gaurav, thank you for the fix! |
Clipboard can paste english chars and numbers, but not Chinese characters, Japanese too. I think this occurs for other languages/symbols too.
The text was updated successfully, but these errors were encountered: