UTF-8 locale in rpm build

Nico Kadel-Garcia nkadel at gmail.com
Sun May 10 11:09:38 UTC 2015


On Sat, May 9, 2015 at 11:00 PM, Orion Poplawski <orion at cora.nwra.com> wrote:
> More and more tests/builds appear to require a UTF-8 locale.  Perhaps it's
> time to have rpm set LANG=C.UTF-8?

If a build system needs a particular language, it should be in the
build scripts themselves. People do local, personal compilation in
environments that use other languages, and in 'LANG=C' or 'LANG=POSIX'
to fix the case-sensitive sorting problem for 'sort -i'

For reference: if LANG=C or LANG=POSIX, then 'sort' output is case
sensitive, and case-insensitive sorting can be activated with 'sort
-i'. If LANG=en.US.UTF-8, which is the US installed standard, then no
force in creation will restore case sensitive sorting to the 'sort'
command without resetting LANG or maybe LOCALE.

The result is normally not problematic, but it can create profound
consistency when different hosts or different environments or even the
same environment at different times have different LANG settings, and
it's not tested anywhere near as often as it's implicitly relied on. I
recently went a few rounds with this because of a system where admins
were starting and restarting services as the daemon user, rather than
with a deignated init script, and inheriting different 'LANG' settings
depending whether they SSH'ed in from Linux, MacOS, or CygWin. (CygWin
was exporting an empty, but active, 'LANG' setting. Hilarity ensued.)


More information about the devel mailing list