Commit 4868dfd5 authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Klaus Aehlig

check-man-warnings: use C.UTF-8 and set LC_ALL

check-man-warnings currently partially forces the en_US.UTF-8 locale by
setting LANG. This implicitly assumes that the locale exists, which
might not be the case when building e.g. in chroot environments. If the
locale does not exist, then check-man-warnings fails with the following

 col: Invalid or incomplete multibyte or wide character
 man: command exited with status 1: col -b -p -x

Some distributions (at least Debian and derivatives) ship an embedded
C.UTF-8 locale with full unicode support. We prefer using C.UTF-8 if it
is available and fall back to en_US.UTF-8 otherwise. We also set LC_ALL
to the same locale, because if they remain unset (i.e. "C"), the same
behavior happens.
Signed-off-by: default avatarApollon Oikonomopoulos <>
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarKlaus Aehlig <>
parent f29dde95
......@@ -20,7 +20,13 @@
set -e
if locale -a | grep -qF 'C.UTF-8'; then
! LANG="$loc" LC_ALL="$loc" MANWIDTH=80 \
man --warnings --encoding=utf8 --local-file "$1" 2>&1 >/dev/null | \
grep -v -e "cannot adjust line" -e "can't break line" | \
grep .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment