Output of `locale -a` could be in mixed encodings?

Paul Eggert eggert@cs.ucla.edu
Wed Jan 21 04:50:00 GMT 2015


Carlos O'Donell wrote:

> Won't such a fix break existing applications relying on this alias
> to operate correctly?

There shouldn't be any such applications.  Applications are already on notice 
that they should not be relying on these obsolete aliases.

This bug is biting us now because recent versions of GNU grep are stricter about 
treating non-text input as binary.  Existing applications that apply 'grep' to 
locale.alias may have problems if locale.alias is incompatible with the current 
locale's encoding.  This suggests that locale.alias (including its comments) 
should be ASCII only.

> What I need is a way to mark the locale deprecated, accept it as an
> alias, but not display it in `locale -a`.

That would also be nice, though I expect it's lower priority.  I assume that it 
could be done with an ASCII-only locale.alias, somehow.



More information about the Libc-locales mailing list