commit dcbfbf59b89f824c58843aadab7038108bf4a2a9 from: Omar Polo date: Sun Oct 20 09:37:05 2024 UTC use grapheme_encode_utf8 instead of our home-grown utf8_encode libgrapheme does a few more checks than we do commit - de151cb67023bb839d4faae4f2b49090a75ecf79 commit + dcbfbf59b89f824c58843aadab7038108bf4a2a9 blob - 1ef8e56feb87db2c086afd3f74980a17c57be5cf blob + d8b5580a795cafd36789f73de5967b0653662eb9 --- ui.c +++ ui.c @@ -324,7 +324,7 @@ dispatch_stdio(int fd, int ev, void *d) if (thiskey.meta) strlcat(keybuf, "M-", sizeof(keybuf)); if (thiskey.cp != 0) { - utf8_encode(thiskey.cp, tmp); + grapheme_encode_utf8(thiskey.cp, tmp, sizeof(tmp)); strlcat(keybuf, tmp, sizeof(keybuf)); } else if ((keyname = unkbd(thiskey.key)) != NULL) { strlcat(keybuf, keyname, sizeof(keybuf));