Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Suddenly Chinese Text from Linux to Windows #1037

@ghost

Description

This issue has been migrated from old Barrier Github repository debauchee/barrier#1037

Issue created on: 2021-01-26 by @devz3r0
Issue last updated on: 2021-11-03

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.


Commented on: 2021-08-17 by @vrf888

The same happens when copying from Windows to macOS


Commented on: 2021-08-19 by @thefinalwolf

@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.


Commented on: 2021-08-20 by @yan12125

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>'

Commented on: 2021-08-20 by @yan12125

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.


Closed on: 2021-11-03 by @p12tic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions