[GH-ISSUE #1037] Suddenly Chinese Text from Linux to Windows #822

Closed
opened 2026-05-05 07:11:01 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @devz3r0 on GitHub (Jan 26, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1037

Describe the bug
Chinese text pasted into second device, similar as here:
https://github.com/symless/synergy-core/issues/316

To Reproduce

Steps to reproduce the behavior:

  1. Go to a website on a linux pc
  2. Copy text over multiple tables of the site
  3. paste text into attached windows PC
  4. See text:
    慟彸慣汬楟彮慴汢彥捳灯⡥〧䰵Ⱗ攠敶瑮‬爧睯敓敬瑣摥Ⱗ〠∩㰾摴㰾灳湡㰾猯慰㹮⼼摴㰾摴㰾灳湡ㄾ㘶〴㈰⼼灳湡㰾琯㹤琼㹤猼慰㹮䍁㈺㨲㔰㌺㩂〳䌺㰲猯慰㹮⼼摴㰾琯㹲⼼扴摯㹹⼼慴汢㹥⼼灳湡㰾猯慰㹮

Expected behavior
copied text, on the second time it works

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. Windows]
  • Client: Windows 10, 19.03 Barrier 2.3.3 english
  • Server: Manjaro Linux (latest update) Barrier version 2.3.3 DE: KDE Plasma 5.20.5 german

Additional context

Add any other context about the problem here.

Originally created by @devz3r0 on GitHub (Jan 26, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1037 **Describe the bug** Chinese text pasted into second device, similar as here: https://github.com/symless/synergy-core/issues/316 **To Reproduce** Steps to reproduce the behavior: 1. Go to a website on a linux pc 2. Copy text over multiple tables of the site 3. paste text into attached windows PC 4. See text: 慟彸慣汬楟彮慴汢彥捳灯⡥〧䰵Ⱗ攠敶瑮‬爧睯敓敬瑣摥Ⱗ〠∩㰾摴㰾灳湡㰾猯慰㹮⼼摴㰾摴㰾灳湡ㄾ㘶〴㈰⼼灳湡㰾琯㹤琼㹤猼慰㹮䍁㈺㨲㔰㌺㩂〳䌺㰲猯慰㹮⼼摴㰾琯㹲⼼扴摯㹹⼼慴汢㹥⼼灳湡㰾猯慰㹮 **Expected behavior** copied text, on the second time it works **Screenshots** **Desktop (please complete the following information):** - OS: [e.g. Windows] - Client: Windows 10, 19.03 Barrier 2.3.3 english - Server: Manjaro Linux (latest update) Barrier version 2.3.3 DE: KDE Plasma 5.20.5 german **Additional context** Add any other context about the problem here.
Author
Owner

@vrf888 commented on GitHub (Aug 17, 2021):

The same happens when copying from Windows to macOS

<!-- gh-comment-id:900661978 --> @vrf888 commented on GitHub (Aug 17, 2021): The same happens when copying from Windows to macOS
Author
Owner

@TFWol commented on GitHub (Aug 19, 2021):

@vrf888 Same here
For me, it works when pasting to something like Notes on OSX. I've noticed it depends on the app I'm pasting to.
Although, I have to restart Barrier on both OSX and Windows often to get paste to even work.

<!-- gh-comment-id:901622093 --> @TFWol commented on GitHub (Aug 19, 2021): @vrf888 Same here For me, it works when pasting to something like Notes on OSX. I've noticed it depends on the app I'm pasting to. Although, I have to restart Barrier on both OSX and Windows often to get paste to even work.
Author
Owner

@yan12125 commented on GitHub (Aug 20, 2021):

This seems an encoding issue. HTML data sent from Linux to Windows is encoded as UTF-8, while it should be UTF-16. The original can be inspected with Python

>>> '慟彸慣汬楟彮慴汢彥捳灯⡥〧䰵Ⱗ攠敶瑮爧睯敓敬瑣摥Ⱗ〠∩㰾摴㰾灳湡㰾猯慰㹮⼼摴㰾摴㰾灳湡ㄾ㘶〴㈰⼼灳湡㰾琯㹤琼㹤猼慰㹮䍁㈺㨲㔰㌺㩂〳䌺㰲猯慰㹮⼼摴㰾琯㹲⼼扴摯㹹⼼慴汢㹥⼼灳湡㰾猯慰㹮'.encode('utf-16')
b'\xff\xfe_ax_call_in_table_scope(\'05L\', event, \'rowSelected\', 0)"><td><span></span></td><td><span>1664002</span></td><td><span>AC:22:05:3B:30:C2</span></td></tr></tbody></table></span></span>'
<!-- gh-comment-id:902629445 --> @yan12125 commented on GitHub (Aug 20, 2021): This seems an encoding issue. HTML data sent from Linux to Windows is encoded as UTF-8, while it should be UTF-16. The original can be inspected with Python ``` >>> '慟彸慣汬楟彮慴汢彥捳灯⡥〧䰵Ⱗ攠敶瑮爧睯敓敬瑣摥Ⱗ〠∩㰾摴㰾灳湡㰾猯慰㹮⼼摴㰾摴㰾灳湡ㄾ㘶〴㈰⼼灳湡㰾琯㹤琼㹤猼慰㹮䍁㈺㨲㔰㌺㩂〳䌺㰲猯慰㹮⼼摴㰾琯㹲⼼扴摯㹹⼼慴汢㹥⼼灳湡㰾猯慰㹮'.encode('utf-16') b'\xff\xfe_ax_call_in_table_scope(\'05L\', event, \'rowSelected\', 0)"><td><span></span></td><td><span>1664002</span></td><td><span>AC:22:05:3B:30:C2</span></td></tr></tbody></table></span></span>' ```
Author
Owner

@yan12125 commented on GitHub (Aug 20, 2021):

I borrowed a fix from Synergy and sent #1254. Note that the fix is for Linux. The issue between Windows and macOS is most likely a different issue and requires a separate fix. I don't have macOS so I cannot test it.

<!-- gh-comment-id:902710108 --> @yan12125 commented on GitHub (Aug 20, 2021): I borrowed a fix from Synergy and sent #1254. Note that the fix is for Linux. The issue between Windows and macOS is most likely a different issue and requires a separate fix. I don't have macOS so I cannot test it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#822
No description provided.