Re: [PATCH v2] exec: make printable macro more concise
From: Rasmus Villemoes
Date: Mon Nov 18 2024 - 06:49:04 EST
On Sat, Nov 16 2024, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 15 Nov 2024 at 23:28, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> Now, whether that logics makes sense is a separate story;
>> that's before my time (1.3.60), so...
>
> Bah. The whole ctype stuff is a mess, partly because it's
> fundamentally a broken concept and depends on locale.
>
> The original ctype array was US-ASCII only, and at some point in the
> random past it got changed to be based on Latin1. Maybe indeed 1.3.60
> as you say, I didn't go digging around.
>
> And Latin1 is not only what I used to use, it's the "low range of
> unicode". So it makes *some* sense, but not a whole lot.
Yes, but the kernel's ctype is almost-but-not-quite latin1...
> It might be good to go back to US-ASCII just as a true lowest common
> denominator, because people who use the ctype macros almost certainly
> don't actually do it on unicode characters, they do it on bytes, and
> then UTF-8 will not actually DTRT with anything but US-ASCII anyway.
Exactly. But you said otherwise two years ago:
https://lore.kernel.org/lkml/3a2fa7c1-2e31-0479-761f-9c189f8ed8c3@xxxxxxxxxxxxxxxxxx/
Rasmus