Multi-byte characters on the lock screen are handled improperly and mess up the password entry. For example, what should become the Python string "üäöÜÄÖß", instead becomes the string "üäöÃ\x9cÃ\x84Ã\x96Ã\x9f".
The problem lies in newm_panel_basic/lock.py in the Lock class's enter_cred() method and is caused by the way characters are handled by the Lock class.
The lock panel uses curses to get input from the user by calling the getch() method on a curses screen. This method waits until curses receives a character from the terminal and returns the byte representing the character as an integer. This means that multi-byte characters are handled as if each byte of the character was a separate character. Since Python's built-in function chr() is called on each individual returned integer, this does not match up with, for example, the UTF-8 encoding. The proper way to convert these multi-byte characters is to interpret them as a sequence of bytes and then attempt to decode that with the system's default encoding.
I have written a fix which only changes a few lines to achieve exactly that.
Since this is my first time, I would like to ask how I may submit the changes for review. Is it possible over e-mail or is an account on Source Hut a requirement?
> I have written a fix which only changes a few lines to achieve exactly that.
Thank you!Over email is perfectly fine, I can be contacted at atha_atha_atha@proton.me
Apologies for the absence!