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
manually handle NUL unicode in g_utf8_get_next_char_validated #1183
Conversation
Much neater message, thanks! Sorry for being annoying about this but: Can you also |
A change in GLib 2.63 broke some assumptions in Irssi that the null-byte NUL / U+0000 is a valid Unicode character. This would occur when the user types Ctrl+Space. As a result, the input loop never manages to process the NUL-byte (and any other user input that follows, ever). This patch adds a manual check that properly advances the input loop if GLib returns -2 (incomplete character) despite the length being positive and a NUL is in first position. Fixes irssi#1180 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967 https://gitlab.gnome.org/GNOME/glib/-/issues/2093
updated |
sorry to bother; but any reason this wasn't merged? or was it merged in a different commit to master? Thank you |
What's the status on this? Some IMEs use ctrl+space to switch between layouts, which crashes irssi every time. |
@ailin-nemui is there a chance that this could get merged (and a new irssi version released soon)? This bug is really annoying, since I have to kill irssi every time it happens :) |
hi @felixfontein even if there were an Irssi release there is nothing guaranteeing you that distributions would ship the update |
@irssi/developers |
@ailin-nemui true, but it definitely increases the chances! Thanks a lot :) |
Just want to say I have been using a patched irssi for over a week now and this does fix the issue, in case you were waiting on user testing. I also disagree that there is 'no guarantee' that distros will ship this update. For distros affected by newer glibs and irssi, the most likely will if this fix is approved, either through backporting the fix or by updating irssi in their repos. |
@LaserEyess they can already do that now, though. (as some have) |
@ailin-nemui thank you very much for fixing this! |
manually handle NUL unicode in g_utf8_get_next_char_validated (cherry picked from commit 7680298)
A change in GLib 2.63 broke some assumptions in Irssi that the null-byte NUL / U+0000 is a valid Unicode character. This would occur when the user types Ctrl+Space. As a result, the input loop never manages to process the NUL-byte (and any other user input that follows, ever).
This patch adds a manual check that properly advances the input loop if GLib returns -2 (incomplete character) despite the length being positive and a NUL is in first position.
Fixes #1180
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967
https://gitlab.gnome.org/GNOME/glib/-/issues/2093