On Tue, 02 Jul 2024 at 03:47:29 +0200, Guillem Jover wrote: > On Fri, 2024-06-07 at 15:40:07 +0200, Alexandre Detiste wrote: > > Maybe a compromise would be to at least mandate some UTF-8 locale. > > dpkg-buildpackage: Require an UTF-8 (or ASCII) locale when > building packages
Allowing ASCII seems counterproductive: that puts us in the code path where various tools and runtimes (especially Python) will refuse to process or output anything outside the 0-127 range, which I believe is exactly the problem that debhelper aims to solve by using C.UTF-8 for some categories of package (in particular those that build with Meson). To get what Alexandre suggested, we'd need to allow UTF-8 but not allow ASCII (so for example fr_FR.UTF-8 or C.UTF-8 is fine, but in particular the C locale is not). Or perhaps this pseudocode? if (charset != UTF-8) { emit a warning export LC_ALL=C.UTF-8 unset LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE (etc.) } smcv