Closed puschkin closed 3 years ago
Compose can contain unicode characters. for example: compose '�' 'A' to Aring
Reading them with subprocess.check_output(..).decode('utf-8') leads to: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
dumpkeys has a parameter --keys-only, that avoids printing the compose keys. More information here: https://man7.org/linux/man-pages/man1/dumpkeys.1.html
Since only the lines that begin with 'keycode' are used, the usage of --keys-only is safe.
I had the issue on 2 systems: Archlinux with python 3.9 Debian 9 with python 3.5
Is there more information/testing required?
Thank you very much for your contribution!
I have merged this into master.
Compose can contain unicode characters. for example: compose '�' 'A' to Aring
Reading them with subprocess.check_output(..).decode('utf-8') leads to:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
dumpkeys has a parameter --keys-only, that avoids printing the compose keys. More information here: https://man7.org/linux/man-pages/man1/dumpkeys.1.html
Since only the lines that begin with 'keycode' are used, the usage of --keys-only is safe.