Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0eea3c73-23b8-005d-9d29-a6b0a52ab86a@redhat.com>
Date: Fri, 6 Feb 2026 22:16:21 +0000 (UTC)
From: Joseph Myers <josmyers@...hat.com>
To: libc-coord@...ts.openwall.com
Subject: Re: c8rtowc and wcrtoc8

On Thu, 5 Feb 2026, Keith Packard wrote:

> > Indeed, the version of "Restartable Functions for Efficient Character 
> > Conversion" that was actually accepted into C2y (N3366 plus an editorial 
> > correction) is explicit that "For the UTF-8, UTF-16, and UTF-32 encodings, 
> > collectively referred to as the Unicode encodings, an indivisible unit of 
> > work for a read operation shall be the sequence of code units that 
> > corresponds to one Unicode code point.".
> 
> Hrm. C23 includes c8rtomb which accepts a single byte per call,
> presumably saving intermediate state in the provided mbstate_t buffer?
> 
> Is there some general change in direction with the idea that this design
> is not desired any longer?

I was only commenting on the approach taken for the <stdmchar.h> functions 
that are new in C2y, not the <uchar.h> functions in C23 (of which the 
char16_t and char32_t ones were in C11).

-- 
Joseph S. Myers
josmyers@...hat.com

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.