locales-c.utf-8 - Circumvent Debian locales packages using C.UTF-8
1. Description
locale-c.utf-8 provides the system integration to use C.UTF-8 within Debian based systems (see rationale below)."[A] locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface."
2. Download
- Upstream Releases: https://get.open-infrastructure.net/software/locales-c.utf-8/upstream
- Upstream Sources: https://git.open-infrastructure.net/software/locales-c.utf-8
- Debian Releases: https://get.open-infrastructure.net/software/locales-c.utf-8/debian
- Debian Sources: https://sources.progress-linux.org/users/daniel.baumann/debian/packages/open-infrastructure-locales-c.utf-8
3. Installation
3.1 Source
- sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc
- git clone https://git.open-infrastructure.net/software/locales-c.utf-8
- cd locales-c.utf-8 && sudo make install
3.2 Debian 10 (buster) and newer
- sudo apt install locales-c.utf-8
4. Development
Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List.
Please base them against the 'next' Git branch using common sense.
Debian specific bugs can also be reported in the Debian Bug Tracking System.
See TODO for a list of items to work on.
5. Rationale
5.1 Introduction
On Debian based systems the locales and locales-all packages contain the localization files (called locale, or locales) for all currently supported regions and languages.
The locales and locales-all packages also contain configuration files to define a default locale for a system. Other packages are relying on these settings in order to work properly.
If the locales or the configuration of the default locale is missing the automatic fallback of libc is used, which currently is C and not C.UTF-8:
- The C locale is the standard locale, it implements the ISO C standard and basically is a en_US locale with a metric system and 24 hours time format.
- The C.UTF-8 is a Unicode-aware version of the C locale.
5.2 Problem
Debian based systems expect a UTF-8 capable locale. Some packages behave differently when being run under a non-UTF-8 locale, such as:
- programs may show warnings on the command line
- programs may fail to start
Additionally some packages in Debian strictly depend on the locales or locales-all package eventhough only they require a proper UTF-8 locale to be used.
The C.UTF-8 locale is included in the libc-bin package which is a package marked essential and thus always present on any Debian based system.
5.3 Solution
The locale-c.utf-8 package provides the necessary glue on the system level (configuration files) as well as the on the package manager level (conflicts/breaks/provides on locales and locales-all) to allow using C.UTF-8 as the default locale by not breaking any other packages assumptions.
5.4 Use Case
On minimal systems such as servers and containers system administrators often prefer to use the C.UTF-8 locale instead of e.g. en_US.UTF-8:
- Compared to locales-all this saves approximatly 125MB of disk space.
- Compared to locales this saves only about 10MB, but avoids the reconfiguration handling on upgrades.