Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: RFC PATCH: stop lowercasing messages from strerror



Mikael Magnusson wrote on Thu, 19 Nov 2026 06:56 +00:00:
> On Wed, Nov 18, 2026 at 6:50 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>> Mikael Magnusson wrote on Tue, 17 Nov 2026 11:49 +00:00:
>> > Even if we decide to keep the lowercasing, it should probably at least
>> > be made to work on multibyte text, or perhaps we should just use
>> > strerror_l when it exists (since POSIX.1-2008 if my manpage is to be
>> > believed) with a "C" locale so that all error messages are in english,
>> > since our other messages aren't translated anyway?
>>
>> I would expect someone who runs with LC_MESSAGES=foo to prefer "some
>> messages are in foo and some are untranslated" to "all messages are untranslated".
>>
>> Besides, even programs that do localize their messages still print
>> unlocalized messages when a particular message hasn't been translated;
>> i.e., it's not unheard of to see a bit of English in the middle of an
>> otherwise-localized session.
>
> This was my original instinct, but then I got a bit unsure, thanks for
> reassuring me :). (I take it your overall view is the patch as I
> posted it is reasonable).

Yes, I think the patch as posted as reasonable.

Also, re-reading it, it occurs to me that the incumbent code accesses
«errmsg + 1» without checking whether «errmsg[0] != '\0'».  That's undefined
behaviour.

"I once fixed UB and a typo in German at the same time." isn't a
sentence just anyone can say :-)

Cheers,

Daniel




Messages sorted by: Reverse Date, Date, Thread, Author