Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
On Sun, 15 May 2022, Adam Borowski wrote: > The tables are loaded on setlocale(LC_CTYPE, ""), iswalpha() is inoperative > at the start of the program. That is normal: at the beginning of main(), the program operates in the C locale. bye, //mirabilos -- Infrastrukturexperte • tarent solutions GmbH Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/ Telephon +49 228 54881-393 • Fax: +49 228 54881-235 HRB AG Bonn 5168 • USt-ID (VAT): DE122264941 Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg /⁀\ The UTF-8 Ribbon ╲ ╱ Campaign against Mit dem tarent-Newsletter nichts mehr verpassen: ╳ HTML eMail! Also, https://www.tarent.de/newsletter ╱ ╲ header encryption!
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
On Fri, May 13, 2022 at 09:24:22AM +0100, Mark Hindley wrote: > The upstream bug[1] referenced from the Debian bug wrt libc6[2] suggests this > has been resolved in 2.35. > > 2.34 is currently in experimental, but (presumably) it will come. Oh, I believed they only added C.UTF-8, but just checked -- they've indeed they've also made it the default. The tables are loaded on setlocale(LC_CTYPE, ""), iswalpha() is inoperative at the start of the program. Meow! > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=17318 > [2] https://bugs.debian.org/874160 -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁'Russkiy voyennyi korabl, idi nakhuy' ⢿⡄⠘⠷⠚⠋⠀ ⠈⠳⣄
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
The upstream bug[1] referenced from the Debian bug wrt libc6[2] suggests this has been resolved in 2.35. 2.34 is currently in experimental, but (presumably) it will come. Mark [1] https://sourceware.org/bugzilla/show_bug.cgi?id=17318 [2] https://bugs.debian.org/874160
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
On Sat, 7 May 2022, Adam Borowski wrote: > I've proposed this myself several years ago but it was then rejected. IIRC > one of the concerns raised was that eg. Postgresql tools do "unset LANG > LC_ALL LC_CTYPE" to get the "C" locale. File a bug against those then; POSIX explicitly states that if all variables are empty the implementation-defined default locale is used, and MirBSD, musl and, from what I heard, now also OpenBSD also default to UTF-8-capable locales. I don't recall where I read about this re. glibc; best to ask the Debian packaging team whether there is talk. I wouldn't hold my breath for it for now though and do it in sysvinit for internal Debian consistency though. bye, //mirabilos -- [17:15:07] Lukas Degener: Kleines Asterix-Latinum für Softwaretechniker: veni, vidi, fixi(t) ;-)
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
On Sat, May 07, 2022 at 07:20:07AM +0100, Mark Hindley wrote: > On Sat, May 07, 2022 at 05:19:05AM +0200, Thorsten Glaser wrote: > > On Sat, 7 May 2022, Adam Borowski wrote: > > > > > But, as glibc still considers unset locale to mean "C" rather than > > > "C.UTF-8", _something_ must set these variables. Debian-installer does > > > > There's talk to chage that in glibc-in-Debian at least. Oh, interesting. Could you please provide a link, as I seem to fail to find such a talk? I've proposed this myself several years ago but it was then rejected. IIRC one of the concerns raised was that eg. Postgresql tools do "unset LANG LC_ALL LC_CTYPE" to get the "C" locale. > > > As systemd does define LANG=C.UTF-8, I'm not hopeful the default will > > Since we seem to agree glibc would be the best place to make this change and > if > there is already talk about changing it there let's add our voice to that > discussion first? Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ I was born a dumb, ugly and work-loving kid, then I got swapped on ⢿⡄⠘⠷⠚⠋⠀ the maternity ward. ⠈⠳⣄
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
Hi, On Sat, May 07, 2022 at 05:19:05AM +0200, Thorsten Glaser wrote: > On Sat, 7 May 2022, Adam Borowski wrote: > > > But, as glibc still considers unset locale to mean "C" rather than > > "C.UTF-8", _something_ must set these variables. Debian-installer does > > There's talk to chage that in glibc-in-Debian at least. [snip..] > > As systemd does define LANG=C.UTF-8, I'm not hopeful the default will Since we seem to agree glibc would be the best place to make this change and if there is already talk about changing it there let's add our voice to that discussion first? Mark
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
On Sat, 7 May 2022, Adam Borowski wrote: > As of Bookworm, ancient encodings are no longer supported. There are ? > But, as glibc still considers unset locale to mean "C" rather than > "C.UTF-8", _something_ must set these variables. Debian-installer does There's talk to chage that in glibc-in-Debian at least. > that, but bare debootstrap does not, and neither do some other ways of > installing Debian. Baring explicit configuration by the user, the > locale will remain unset. Debian officially only supports d-i though, but getting C as default is not a bad thing compared to other available options. > Thus, let's add putenv("LANG=C.UTF-8") to pid 1; further startup will > usually overwrite that with whatever values are configured -- possibly > "C" to go back to the old state. Not exactly: if explicitly unconfigured to keep C, it’ll change. It will change in a compatibl-ish way, sure (which is why I proposed C.UTF-8 to be created about nine years ago in the first place), but things can break (tr -dc '[[:alpha:]]' changes meaning, for example). > As systemd does define LANG=C.UTF-8, I'm not hopeful the default will They do? Ugh. Of course they do whatever suits Poettering’s laptop. I’m personally not convinced in favour of this switch, but, yeah, let’s do this for inner consistency in Debian. I’d put it into /etc/rc, not the init binary, though, but I see that such a thing doesn’t exist… and I guess it would not handle whatever is run from inittab, so… probably, yeah. I was just writing about calling init scripts, but my cleanenv script has been using C.UTF-8 in LC_ALL for 15 months already, too… so, okay. Not making much sense this late in the night? IF so, sorry. gn8, //mirabilos -- Yes, I hate users and I want them to suffer. -- Marco d'Itri on gmane.linux.debian.devel.general
Bug#1010682: sysvinit-core: let's default LANG to C.UTF-8
Package: sysvinit-core Version: 3.03-1 Severity: wishlist X-Debbugs-Cc: kilob...@angband.pl As of Bookworm, ancient encodings are no longer supported. There are still vestiges of their support, and you can force generation of such a locale, but more and more things break. And I'd be glad if it's all gone. It's good if you can rely on the encoding being UTF-8. But, as glibc still considers unset locale to mean "C" rather than "C.UTF-8", _something_ must set these variables. Debian-installer does that, but bare debootstrap does not, and neither do some other ways of installing Debian. Baring explicit configuration by the user, the locale will remain unset. As systemd does define LANG=C.UTF-8, I'm not hopeful the default will be handled in a better place like glibc. Thus, let's add putenv("LANG=C.UTF-8") to pid 1; further startup will usually overwrite that with whatever values are configured -- possibly "C" to go back to the old state. (I just had an example -- an ARM box whose install started from an upstream image lacked the locale setting.) Meow! -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (490, 'testing'), (250, 'unstable') Architecture: arm64 (aarch64) Kernel: Linux 5.17.0-1-arm64 (SMP w/6 CPU threads) Kernel taint flags: TAINT_CRAP Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages sysvinit-core depends on: ii debconf [debconf-2.0] 1.5.79 ii initscripts3.03-1 ii libc6 2.33-7 ii libselinux13.3-1+b2 ii mount 2.38-4 ii sysv-rc3.03-1 ii sysvinit-utils 3.03-1 Versions of packages sysvinit-core recommends: pn orphan-sysvinit-scripts Versions of packages sysvinit-core suggests: pn bootlogd -- debconf information: sysvinit/hurd-fix-inittab: