Package: locales
Version: 2.39-1
Severity: normal
Tags: upstream
3. SSH in or run some `apt upgrade` or `dpkg` ⇒ observe locale warnings about fallback to `C.UTF-8`.
**Expected Behavior:**
Once `en_US.UTF-8` is generated and configured, subsystems should uniformly use it, with no fallback warnings or temporary use of `C.UTF-8`.
**Actual Behavior:**
Early in the boot, glibc (or subsystems) temporarily fall back to `C.UTF-8`, causing warnings even though the correct locale is already configured.
When connecting to the host via SSH:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
**Impact:**
- Warnings on every fresh install using UTF-8.
- Unnecessary confusion and noise.
- Scripts or automation that expect no locale fallback break or misbehave.
**Suggested Fixes / Areas to Investigate:**
- Delay glibc fallback until locale data is available, suppress warnings when fallback is transient.
- Pre-generate a minimal UTF-8 locale in base Debian images (e.g. `en_US.UTF-8`).
- Adjust locale selection logic to prefer the configured locale over `C.UTF-8` fallback whenever safe.
- In Debian’s `locales` or glibc packaging, integrate more early initialization to prevent fallback in benign cases.
**Related bug:** Debian BTS Bug #719590 (“C.UTF-8 locales should be regarded like C w.r.t. $LANGUAGE precedence”) :contentReference[oaicite:2]{index=2}