'\" t
.\" Title: locales-c.utf-8
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 20170410
.\" Manual: Open Infrastructure
.\" Source: locales-c.utf-8
.\" Language: English
.\"
.TH "LOCALES\-C\&.UTF\-8" "7" "20170410" "locales\-c\&.utf\-8" "Open Infrastructure"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
locales-c.utf-8 \- Circumvent Debian locales packages using C\&.UTF\-8
.SH "DESCRIPTION"
.sp
"[A] locale is a set of parameters that defines the user\(cqs language, region and any special variant preferences that the user wants to see in their user interface\&.":: \(em Wikipedia (https://en\&.wikipedia\&.org/wiki/Locale_(computer_software))
.sp
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\&.
.SH "DOWNLOAD"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Upstream Releases:
https://files\&.open\-infrastructure\&.net/software/locales\-c\&.utf\-8/upstream
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Upstream Sources:
https://sources\&.open\-infrastructure\&.net/software/locales\-c\&.utf\-8
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debian Releases:
https://files\&.open\-infrastructure\&.net/software/locales\-c\&.utf\-8/debian
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debian Sources:
https://sources\&.progress\-linux\&.org/users/daniel\&.baumann/debian/packages/open\-infrastructure\-locales\-c\&.utf\-8
.RE
.SH "INSTALLATION"
.SS "SOURCE"
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
sudo apt install asciidoc git docbook\-xml docbook\-xsl libxml2\-utils make xsltproc
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
git clone
https://sources\&.open\-infrastructure\&.net/software/locales\-c\&.utf\-8
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
cd locales\-c\&.utf\-8 && sudo make install
.RE
.SS "DEBIAN 10 (BUSTER) AND NEWER"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
sudo apt install locales\-c\&.utf\-8
.RE
.SH "DEVELOPMENT"
.sp
Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
https://lists\&.open\-infrastructure\&.net/listinfo/software
.RE
.sp
Please base patches against the \fInext\fR Git branch using common sense:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
https://www\&.kernel\&.org/doc/Documentation/SubmittingPatches
.RE
.sp
Debian specific bugs can also be reported in the Debian Bug Tracking System:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
https://bugs\&.debian\&.org
.RE
.SH "RATIONAL"
.SS "Introduction"
.sp
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\&.
.sp
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\&.
.sp
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):
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The C\&.UTF\-8 is a Unicode\-aware version of the C locale\&.
.RE
.SS "Problem"
.sp
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:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
programs may show warnings on the command line
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
programs may fail to start
.RE
.sp
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\&.
.sp
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\&.
.SS "Solution"
.sp
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\&.
.SS "Use Case"
.sp
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:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Compared to locales\-all this saves approximatly 125MB of disk space\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Compared to locales this saves only about 10MB, but avoids the reconfiguration handling on upgrades\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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)\&.
.RE
.SS "Bugs"
.sp
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\&.
.sp
Therefore packages that are build\-depending on locales or locales\-all and are actually using another locale than C\&.UTF\-8 directly, will fail\&.
.sp
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\&.
.sp
Given that apt handels this properly this is not really a problem:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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\&.
.RE
.sp
A system only gets the locales\-c\&.utf\-8 package installed if the system administrator installs it on purpose which is fine\&.
.SH "FILES"
.sp
The following files are used:
.PP
\fB/etc/profile\&.d/zz\-locale\-c\&.utf\-8\&.sh\fR
.RS 4
bash configuration file\&.
.RE
.PP
\fB/etc/default/locales\fR
.RS 4
locales configuration file\&.
.RE
.SH "SEE ALSO"
.sp
locale(1), locale(7)\&.
.SH "LINKS"
.PP
\fBThe GNU C Library: Locales and Internationalization\fR
.RS 4
https://www\&.gnu\&.org/software/libc/manual/html_node/Locales\&.html
.RE
.SH "AUTHORS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Daniel Baumann
.RE