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:
parent
6bd79f6a5a
commit
956823f74d
@ -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; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user