Skip to content
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

Persian language special characters won't be transferred in Qubes copy / paste #5914

Closed
Khoramyar opened this issue Jun 29, 2020 · 5 comments
Labels
C: gui-virtualization diagnosed Technical diagnosis has been performed (see issue comments). localization This issue concerns translating things into different languages or adapting them to other regions. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience

Comments

@Khoramyar
Copy link

Qubes OS version
R4.0

Affected component(s) or functionality
Copy / paste between Qubes

Brief summary
5 Persian language special characters ( ک ) ( گ ) ( چ ) ( پ ) ( ژ ) won't be transferred using Qubes copy / paste between Qubes.

To Reproduce
Steps to reproduce the behavior:

_1. Copy a Persian language text containing any 4 special characters of ( ک ) ( گ ) ( چ ) ( پ ) ( ژ ) and paste it in another Qube. non of these characters gets transferred to the target Qube.

_2. For instance, copy and paste these sample words: ( کلمه - گل - پارسی - ژاله - گچبری - چراغ ) and you get ( لمه - ل - ارسی - اله - بری - راغ )

_3. It happens between all VMs, template doesn't make a difference, if it's Fedora, Debian, etc.

Expected behavior

A clear and concise description of what you expected to happen.

The exact text should be transferred to the other Qube.

Actual behavior
What actually happened (instead of what you expected to happen).

These characters wont be transferred using Qubes copy / past between Qubes: ( ک ) ( گ ) ( چ ) ( پ ) ( ژ )

Additional context
Add any other context about the problem here.

This should also effect Arabic, as one of these characters are shared with Arabic language: ( ک )

@Khoramyar Khoramyar added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Jun 29, 2020
@iamahuman
Copy link

iamahuman commented Jun 30, 2020

Tested with a nonsensical Arabic text کگچپژ. The characters are:

Character Codepoint Unicode codepoint name UTF-8 sequence (hex)
ک U+06A9 ARABIC LETTER KEHEH DA A9
گ U+06AF ARABIC LETTER GAF DA AF
چ U+0686 ARABIC LETTER TCHEH DA 86
پ U+067E ARABIC LETTER PEH D9 BE
ژ U+0698 ARABIC LETTER JEH DA 98

After pasting (Ctrl-Shift-V), the following method works on the Terminal (outputs the UTF-8 byte sequence as-is, xclip does not perform any character set conversion):

  • xclip -sel clip -o -noutf8 (Note the discrepancy between what xclip and the terminal emulator think the text is encoded in)
  • xclip -sel clip -o -noutf8 -target whatever
  • xclip -sel clip -o -noutf8 -target the_quick_brown_fox_jumps_over_the_lazy_dog
  • xclip -sel clip -o -target STRING

The following methods discard the affected characters when pasted:

  • xclip -sel clip -o -target UTF8_STRING
  • xclip -sel clip -o -target COMPOUND_TEXT
  • xclip -sel clip -o
  • xsel -bo
  • Pasting in gedit or Firefox, when the text is accompanied with other ASCII characters

The following methods interpret the encoded UTF-8 as ISO-8859-1 and garble the text (speculation: the GUI toolkit tries to paste it as UTF8_STRING or COMPOUND_TEXT, finds nothing, and then fallbacks to STRING but interprets as Latin-1 unlike the terminal emulators):

  • Pasting into gedit or Firefox, when they are the sole characters copied (results in Ú©Ú¯Ú�Ù¾Ú�)

The following method obviously does not work, with or without the GUI Agent:

  • xclip -sel clip -o -target the_quick_brown_fox_jumps_over_the_lazy_dog (fails with: Error: target the_quick_brown_fox_jumps_over_the_lazy_dog not available)

@mfc mfc added localization This issue concerns translating things into different languages or adapting them to other regions. ux User experience labels Jun 30, 2020
@andrewdavidwong andrewdavidwong added C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jun 30, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Jun 30, 2020
@iamahuman
Copy link

If anything, this issue is strictly the responsibility of Qubes GUI Agent. The likely relevant part:

https://github.com/QubesOS/qubes-gui-agent-linux/blob/9a2dcb0d5361e6f15c96478d5f0f2786e03a29b6/gui-agent/vmside.c#L1019-L1073

@iamahuman
Copy link

iamahuman commented Jun 30, 2020

We shall ditch Xlib locale functions and stick to INCR like xclip does. Should probably also solve #5781.

@iamahuman
Copy link

Fixed by QubesOS/qubes-gui-agent-linux#117 (related issue: #2845)


#2845 (comment):

Automated announcement from builder-github

The package qubes-gui-agent_4.0.32-1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update


#2845 (comment):

Automated announcement from builder-github

The package gui-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos8 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update


#2845 (comment):

Automated announcement from builder-github

The component gui-agent-linux (including package pulseaudio-qubes-4.0.32-1.fc32) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@andrewdavidwong
Copy link
Member

Closing this as resolved. If you believe the issue is not yet resolved, or if anyone is still affected by this issue, please leave a comment, and we'll be happy to reopen this. Thank you.

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gui-virtualization diagnosed Technical diagnosis has been performed (see issue comments). localization This issue concerns translating things into different languages or adapting them to other regions. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience
Projects
None yet
Development

No branches or pull requests

4 participants