Scroll to navigation

LOCALES-C.UTF-8(7) Open Infrastructure LOCALES-C.UTF-8(7)

NAME

locales-c.utf-8 - Circumvent Debian locales packages using C.UTF-8

DESCRIPTION

"[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.":: — Wikipedia (https://en.wikipedia.org/wiki/Locale_(computer_software))
locale-c.utf-8 provides the system integration to use C.UTF-8 within Debian based systems without using the locales or locales-all package.

DOWNLOAD

INSTALLATION

SOURCE

1.sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc
3.cd locales-c.utf-8 && sudo make install

DEBIAN 10 (BUSTER) AND NEWER

•sudo apt install locales-c.utf-8

DEVELOPMENT

Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List:
•https://lists.open-infrastructure.net/listinfo/software
Please base patches against the next Git branch using common sense:
•https://www.kernel.org/doc/Documentation/SubmittingPatches
Debian specific bugs can also be reported in the Debian Bug Tracking System:
•https://bugs.debian.org

RATIONAL

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.

Problem

Debian based systems expect a UTF-8 capable locale to be used. 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 they only require any 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.

Solution

The locale-c.utf-8 package provides the necessary integration on the system level (configuration files) as well as the on the package-manager level (conflicts/replaces/provides on locales and locales-all) to allow using C.UTF-8 as the default locale by not breaking any other packages assumptions.

Use Case

On minimal systems such as servers and containers system administrators often prefer to use the C.UTF-8 locale. This has the following advantages over e.g. using 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.
•For European systems the non-metric en_US.UTF-8 locale is somewhat alien, whereas the C.UTF-8 follows the ISO standards (metric system).

Bugs

The locale-c.utf-8 package conflicts, replaces and provides the locales and locales-all package. While this allows to satisfy the package dependencies of other packages upon locales and locales-all, the locale-c.utf-8 does not contain any locales at all.
Therefore packages that are build-depending on locales or locales-all and are actually using another locale than C.UTF-8 directly, will fail.
However satisfying the package-manager to allow to use C.UTF-8 instead of being forced to install locales or locales-all uselessly is the sole purpose of the locales-c.utf-8 package.
Given that apt handels this properly this is not really a problem:
•apt install locales or apt install locales-all will always install the actual locales or locales-all package, not the locale-c.utf-8 providing it.
•packages declaring a depends or build-depends against locales or locales-all, will get locales or locales-all pulled in, not locales-c.utf-8.
A system only gets the locales-c.utf-8 package installed if the system administrator installs it on purpose which is fine.

FILES

The following files are used:
/etc/profile.d/zz-locale-c.utf-8.sh
bash configuration file.
/etc/default/locales
locales configuration file.

SEE ALSO

locale(1), locale(7).

LINKS

The GNU C Library: Locales and Internationalization

AUTHORS

•Daniel Baumann <daniel.baumann@open-infrastructure.net>
20170410 locales-c.utf-8