8065138: Encodings.isRecognizedEnconding sometimes fails to recognize 'UTF8'
authorerikj
Mon, 24 Nov 2014 11:53:47 +0100
changeset 27591 f8f4973d2329
parent 27590 9d0aec632d70
child 27592 af7df0dd5ff7
8065138: Encodings.isRecognizedEnconding sometimes fails to recognize 'UTF8' Reviewed-by: dfuchs
make/common/JavaCompilation.gmk
--- a/make/common/JavaCompilation.gmk	Fri Nov 21 08:00:30 2014 -0800
+++ b/make/common/JavaCompilation.gmk	Mon Nov 24 11:53:47 2014 +0100
@@ -400,13 +400,15 @@
   # Now we can setup the depency that will trigger the copying.
   $$($1_BIN)$$($2_TARGET) : $2
 	$(MKDIR) -p $$(@D)
-	$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
+	export LC_ALL=C ; $(CAT) $$< \
+	    | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
 	        -e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
 	    | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
 	    | $(SED) -e '/^#/d' -e '/^$$$$/d' \
 	        -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
 	        -e 's/^[ 	]*//;s/[ 	]*$$$$//' \
-	        -e 's/\\=/=/' | LC_ALL=C $(SORT) > $$@
+	        -e 's/\\=/=/' \
+	    | $(SORT) > $$@
 	$(CHMOD) -f ug+w $$@
 
   # And do not forget this target