rickyrockrat / parcellite

GNU General Public License v3.0
220 stars 29 forks source link

Parcellite seems to use the US keyboard layout when pasting without saving history #49

Closed PauloGDPeixoto closed 2 years ago

PauloGDPeixoto commented 3 years ago

I disabled the history in parcellite and noticed that when I paste an item containing special characters, they get replaced with the equivalent keystroke in the US layout. I'm using the pt-PT keyboard layout exclusively. Also, as I think it might be relevant, I'm attaching my locale settings:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=pt_PT.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Switching history back on resolves the issue, but for security reasons, I'd like to have it disabled.

rickyrockrat commented 3 years ago

Can you give some examples of the special characters? The text does get passed through the UTF parser (g_utf8_validate), and since your local settings are en_US, I suspect this is part of the issue.

PauloGDPeixoto commented 3 years ago

Any that don't match between the PT and US keyboard layout, for example: +çº,.-;:_~'«?» It seems that parcellite is recording the keystroke codes, rather than the characters themselves.

I find it a bit strange that it could be the locale settings, but I'm willing to test. I just find it strange because I don't think it's an edge case: I'm simply using the system in english, while my keyboard is configured for the portuguese layout.

For the record, I can't seem to get the correct behaviour by disabling history anymore :(

rickyrockrat commented 3 years ago

I'm assuming that when you quit parcellite so it no longer runs, your cut/paste works as expected?

PauloGDPeixoto commented 3 years ago

ctrl+c/ctrl+x ctrl+v work fine, even when parcellite is running, what messes the characters up is selecting an item from the history and pasting it from there. I have auto paste on, that might be related to the issue as well.

rickyrockrat commented 3 years ago

Did you ever resolve this? Sorry, I got busy with a new job.

PauloGDPeixoto commented 3 years ago

Same here... :smile: As I couldn't afford the time, I ended up switching to another application, sorry. I'll try to have a look again soon.

rickyrockrat commented 2 years ago

If you are using a different keyboard that the local settings, that seems a little off. At any rate, I'm going to close this since I see no way to duplicate it. Please comment if it pops up again.