Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2015 14:00:17 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287204 - head/usr.bin/vi/catalog
Message-ID:  <201508271400.t7RE0HiA071300@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Thu Aug 27 14:00:16 2015
New Revision: 287204
URL: https://svnweb.freebsd.org/changeset/base/287204

Log:
  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.

Modified:
  head/usr.bin/vi/catalog/Makefile

Modified: head/usr.bin/vi/catalog/Makefile
==============================================================================
--- head/usr.bin/vi/catalog/Makefile	Thu Aug 27 13:17:05 2015	(r287203)
+++ head/usr.bin/vi/catalog/Makefile	Thu Aug 27 14:00:16 2015	(r287204)
@@ -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;						\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508271400.t7RE0HiA071300>