From nobody Fri Mar 25 11:10:05 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 72C551A25C44 for ; Fri, 25 Mar 2022 11:10:14 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from mail.gundo.com (gibson.gundo.com [75.145.166.65]) by mx1.freebsd.org (Postfix) with ESMTP id 4KPzs14FsMz4SvL for ; Fri, 25 Mar 2022 11:10:13 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from webmail.gundo.com (variax.gundo.com [75.145.166.70]) by mail.gundo.com (Postfix) with ESMTP id BB42D4C0714; Fri, 25 Mar 2022 06:10:05 -0500 (CDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Date: Fri, 25 Mar 2022 11:10:05 +0000 From: Pau Amma To: Warner Losh Cc: FreeBSD Hackers Subject: Re: What's the locale for system files (e.g. /etc/fstab)? In-Reply-To: References: <70B211BB-15BA-47A4-8F9C-C833AA8C1EAA@freebsd.org> <202203241519.22OFJ3Mk098649@gndrsh.dnsmgr.net> <71356.1648139436@kaos.jnpr.net> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <7773a0c73c77649efaf9f748ee8bb0b4@gundo.com> X-Sender: pauamma@gundo.com Organization: The Cabal (TINC) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KPzs14FsMz4SvL X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=gundo.com; spf=pass (mx1.freebsd.org: domain of pauamma@gundo.com designates 75.145.166.65 as permitted sender) smtp.mailfrom=pauamma@gundo.com X-Spamd-Result: default: False [-2.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[pauamma]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[75.145.166.65:from]; R_SPF_ALLOW(-0.20)[+ip4:75.145.166.64/28]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[75.145.166.65:from]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gundo.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7922, ipnet:75.144.0.0/13, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N (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 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)