Unbreak nvi message catalog generation for 8 bit locales.

Feeding any file encoded in 8 bit locales such as KOI8-RU
to sort utility running under UTF-8 locale produces astonishing
result of recoding the output to UTF-8. To counter that, just
run sort under 'C' locale for now.
This commit is contained in:
Alexander Kabaev 2015-08-27 14:00:16 +00:00
parent 26f0e89a6d
commit 93f422607b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287204

View File

@ -32,9 +32,9 @@ CAT+= $c.UTF-8
.for c in ${CAT}
${c}: ${c}.base
@echo "... $c"; \
echo "... $c"; \
rm -f $c; \
sort -u ${.ALLSRC} | \
env LANG=C sort -u ${.ALLSRC} | \
awk '{ \
if ($$1 == 1) { \
print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \
@ -44,7 +44,7 @@ ${c}: ${c}.base
print "DUPLICATE MESSAGE NUMBER " $$1; \
exit 1; \
} \
print $0; \
print $$0; \
}' | \
sed -e '1s/^/$$set 1~$$quote "~/; 1y/~/\n/' | \
gencat $c /dev/stdin; \