7040301 ... remove redundant chars from LC_CTYPE categories (equivalent but smaller localedef files)
authorjenda
Thu, 19 May 2011 11:33:24 +0200
changeset 135 d7f2a801f9fe
parent 134 455f05a692fc
child 136 c565f46bf4eb
7040301 ... remove redundant chars from LC_CTYPE categories (equivalent but smaller localedef files)
misc/patches/cldr_tools/23_ctype.patch
--- a/misc/patches/cldr_tools/23_ctype.patch	Thu May 19 11:33:20 2011 +0200
+++ b/misc/patches/cldr_tools/23_ctype.patch	Thu May 19 11:33:24 2011 +0200
@@ -3,6 +3,10 @@
 (http://www.unicode.org/versions/Unicode6.0.0/ch04.pdf)
 instead of ICU categories.
 
+To reduce size and compilation time, we remove the characters included in ctype
+category by default from localedef file. The change has no efect to final
+locale object, but localedef file shrank by 25%.
+
 diff -ruN cldr_tools.orig//tools/java/org/unicode/cldr/posix/POSIX_LCCtype.java cldr_tools/tools/java/org/unicode/cldr/posix/POSIX_LCCtype.java
 --- cldr_tools.orig//tools/java/org/unicode/cldr/posix/POSIX_LCCtype.java
 +++ cldr_tools/tools/java/org/unicode/cldr/posix/POSIX_LCCtype.java
@@ -23,11 +27,11 @@
 -		  { "blank", "[[:Whitespace:]-[\\u000A-\\u000D \\u0085 [:Line_Separator:][:Paragraph_Separator:]]]" } };
 +		  { "upper", "[[:Lu:][:Lt:]]" },
 +		  { "lower", "[[:Ll:][\\u01C5\\u01C8\\u01CB\\u01F2]]" }, 
-+		  { "alpha", "[[[:L:][:N:]]-[[:Lu:][:Lt:][:Ll:][0-9]]]" },
-+		  { "space", "[[:Z:][\\u0009\\u000A\\u000B\\u000C\\u000D\\u0085]]" },
++		  { "alpha", "[[[:L:][:N:]]-[[:Lu:][:Lt:][:Ll:][0-9]]]" },	/* auto included: upper, lower [:Lu:][:Lt:][:Ll:] */
++		  { "space", "[\\u000A\\u000B\\u000C\\u000D\\u0085]" }, 	/* auto included: blank [:Z:][\\u0009] */
 +		  { "cntrl", "[:Cc:]" }, 
-+		  { "graph", "[[:L:][:N:][:P:][:S:][:Cf:][:M:][:Co:]]" },
-+		  { "print", "[[:L:][:N:][:P:][:S:][:Cf:][:M:][:Co:][:Z:]]" },
++		  { "graph", "[[:M:][:Co:]]" },					/* auto included: alpha, xdigit, punct  [:L:][:N:][:P:][:S:][:Cf:] */
++		  { "print", "[[:Z:]-[\\u0020]]" }, 				/* auto included: alpha, xdigit, punct, <space>  [:L:] [:N:] [:P:][:S:][:Cf:]*/
 +		  { "punct", "[[:P:][:S:][:Cf:]]" },
 +		  { "digit", "[0-9]" },
 +		  { "xdigit", "[0-9 a-f A-F]" },