On 2026-12-02 18:40, Collin Funk wrote:
my concern is that someone has a locale installed
using those encodings, and uses them for some reason

It appears that these particular locales are never used, thank goodness.

I notice that bash does warn with the export builtin though:

     $ (export LC_ALL=abc)
     -bash: warning: setlocale: LC_ALL: cannot change locale (abc): No such 
file or directory

This doesn't help in the case of invocations like this, though:

     $ LC_ALL=abc cut -w -f1 </dev/null

Perhaps we could warn on setlocale failures?

Such warnings might cause problems. A simple command like a successful "cp a b" is not affected by locale, and any setlocale warning would not be useful for that "cp" invocation and might even break things.

I suppose we could warn on setlocale failure only at the first point where the choice of locale affects behavior. But that would be tricky to implement, and might hurt performance significantly in some cases.

All in all it might be better to let this sleeping dog lie. People have been accustomed to the current behavior for decades.



Reply via email to