Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2022 11:10:05 +0000
From:      Pau Amma <pauamma@gundo.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: What's the locale for system files (e.g. /etc/fstab)?
Message-ID:  <7773a0c73c77649efaf9f748ee8bb0b4@gundo.com>
In-Reply-To: <CANCZdfrJhva3sgm6HnZbYrvGs90R-sJWJPfuZfT0C3Ozzz37Hg@mail.gmail.com>
References:  <70B211BB-15BA-47A4-8F9C-C833AA8C1EAA@freebsd.org> <202203241519.22OFJ3Mk098649@gndrsh.dnsmgr.net> <CANCZdfp1oJdC2HfU63U_3y4y%2BQE0TswdVSg%2Big4uS3RJC3yK3w@mail.gmail.com> <71356.1648139436@kaos.jnpr.net> <CANCZdfrZjeU_%2BLRew9BOCdktDi3aTUoeEaBkrov9FccvwfaN0g@mail.gmail.com> <EC99D2B8-769D-46BA-AF87-7B48D90E70D1@juniper.net> <CANCZdfrJhva3sgm6HnZbYrvGs90R-sJWJPfuZfT0C3Ozzz37Hg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(pruned cc: to just the list)

On 2022-03-25 04:08, Warner Losh wrote:
> On Thu, Mar 24, 2022 at 2:51 PM Phil Shafer <phil@juniper.net> wrote:
> 
>> On 24 Mar 2022, at 15:12, Warner Losh wrote:
>> > That is the primary reason for system files always being C.UTF-8...
>> > There is no way to tag it as anything else... and some of these files
>> > are often parsed from a context that can't set the locale, like the
>> > boot loader or the kernel... also, these files have a format that was
>> > defined back in the 7bit ascii time frame. They also don't make use of
>> > the text in a way that isn't literal...
>> 
>> Exactly.  There's just no way to know in the current setup.  And
>> declaring it UTF-8 will break anyone currently using locale-based
>> values.  Using the symlink has the value of allowing a simple fix 
>> ("sudo
>> ln -s $LANG /etc/locale").
> 
> Except it's not a simple fix. Sure, you can find this value, but 
> nothing
> will use it, necessarily. Since there's little value and little need, I
> think it would be more hassle than it's worth absent a much more
> extensive audit. For system wide things like config files, we assume
> C.UTF-8 or the lessor ASCII-7 (or maybe ASCII-8).

There's no ASCII-8. (If you meant 8859-*, there's 15 or 16, which 
essentially means "no".) Assuming ASCII (and therefore 7-bit) went out 
of style last millenium. Anything that expects or enforces something 
other than Unicode (which for all practical purposes means UTF-8) needs 
to be fixed urgently.

-- 
#BlackLivesMatter #TransWomenAreWomen #AccessibilityMatters 
#StandWithUkrainians
English: he/him/his (singular they/them/their/theirs OK)
French: il/le/lui (iel/iel and ielle/ielle OK)
Tagalog: siya/niya/kaniya (please avoid sila/nila/kanila)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7773a0c73c77649efaf9f748ee8bb0b4>