git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] utf8: two minor fixes

From
Dirk Gouders <dirk@gouders.net>
Date
Nov 16, 2026, 18:56 UTC
Message-ID
<20261116-master-v1-0-dc2a50ce0aa0@gouders.net>

A patch here on the list made me look at display_mode_esc_sequence_len() in utf8.c and I found two details in the file that are perhaps worth a fix:

1) utf8_strnwidth() disregards the given len argument when fed
   with proper string and len.
2) The comment for utf8_strnwidth() is incorrect: it states the
   function returns strlen() for cases when it actually returns its
   len argument.
Signed-off-by: Dirk Gouders <dirk@gouders.net>
---
Dirk Gouders (2):
      utf8: respect bounds in utf8_strnwidth()
      utf8: fix comment for utf8_strnwidth()
 t/unit-tests/u-utf8-width.c | 11 +++++++++++
 utf8.c                      | 12 ++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

--- base-commit: 7fb6055e678f800320d8ab8cd8f201d9493d1ba0 change-id: 20261116-master-69b171612823

Next: Dirk Gouders
Message 1 of 8 in “utf8: two minor fixes”
  1. 0/2 utf8: two minor fixesDirk Gouders, Nov 16, 2026
  2. 1/2 utf8: respect bounds in utf8_strnwidth()Dirk Gouders, Nov 16, 2026
  3. Junio C HamanoNov 17, 2026
  4. Dirk GoudersNov 17, 2026
  5. Junio C HamanoNov 17, 2026
  6. Dirk GoudersNov 17, 2026
  7. Junio C HamanoNov 17, 2026
  8. 2/2 utf8: fix comment for utf8_strnwidth()Dirk Gouders, Nov 16, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.