On Sat, Oct 29, 2022 at 6:10 AM Claude Pache <claude.pa...@gmail.com> wrote:

>
>
> > Le 28 oct. 2022 à 23:43, Jordan LeDoux <jordan.led...@gmail.com> a
> écrit :
> >
> > On Fri, Oct 28, 2022 at 12:30 PM Joshua Rüsweg via internals <
> > internals@lists.php.net> wrote:
> >
> > Not to try and bikeshed further, but wouldn't `getBytesFromChars` or
> > `getBytesFromCharList` be more clear while being nearly as accurate?
> >
> > Jordan
>
>
> In the face of multibyte character sets such as UTF-8, I wouldn’t use
> “char” to mean “byte” (even if, in practice, the most common use will be
> strings of 1-byte chars). “Alphabet” or “string” might be ambiguous (is it
> an alphabet of bytes or an alphabet of characters?), but at least they are
> not contradictory.
>
> —Claude


Well... perhaps. But "get bytes from character list" would do exactly what
it says it will do, even from UTF-8 strings. It will use any of the bytes
from the character list, even if one character in the list may contribute
multiple bytes to choose from. It is *not* contradictory, just potentially
confusing about the result

Jordan

Reply via email to