From 3e6960d70408b9f4e09714ed3341173673ed28b2 Mon Sep 17 00:00:00 2001 From: Yuri Pankov Date: Tue, 28 Feb 2017 02:38:45 +0300 Subject: [PATCH] 4006 Certain printable unicode characters misclassified as nonprintable Portions contributed by: John Marino Reviewed by: Garrett D'Amore Approved by: Richard Lowe --- exception_lists/copyright | 1 + usr/src/cmd/localedef/Makefile | 6 +- usr/src/cmd/localedef/ctype.c | 2 + usr/src/cmd/localedef/data/ctype.sh | 6 +- usr/src/cmd/localedef/data/manual-input.UTF-8 | 1070 +++++++++++++++++++++++++ 5 files changed, 1081 insertions(+), 4 deletions(-) create mode 100644 usr/src/cmd/localedef/data/manual-input.UTF-8 diff --git a/exception_lists/copyright b/exception_lists/copyright index 520741dd1d..5f627a4921 100644 --- a/exception_lists/copyright +++ b/exception_lists/copyright @@ -83,6 +83,7 @@ usr/src/cmd/krb5/ldap_util/kdb5_ldap_list.h usr/src/cmd/krb5/ldap_util/kdb5_ldap_policy.h usr/src/cmd/krb5/ldap_util/kdb5_ldap_realm.h usr/src/cmd/krb5/ldap_util/kdb5_ldap_services.h +usr/src/cmd/localedef/data/manual-input.UTF-8 usr/src/cmd/smbsrv/smbd/eventlog.dll usr/src/cmd/terminfo/termcap.src usr/src/cmd/terminfo/terminfo.src diff --git a/usr/src/cmd/localedef/Makefile b/usr/src/cmd/localedef/Makefile index 95fc87312b..5f1ed6c312 100644 --- a/usr/src/cmd/localedef/Makefile +++ b/usr/src/cmd/localedef/Makefile @@ -10,7 +10,7 @@ # # -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# Copyright 2017 Nexenta Systems, Inc. # Copyright 2011 EveryCity Ltd. All rights reserved. # Copyright 2013 DEY Storage Systems, Inc. # Copyright 2016 Joyent, Inc. @@ -32,7 +32,7 @@ HDRS = localedef.h SRCS = $(OBJS:%.o=%.c) CPPFLAGS += -I $(SRC)/lib/libc/port/locale -NATIVE_CPPFLAGS += -I $(SRC)/lib/libc/port/locale +NATIVE_CPPFLAGS += -I $(SRC)/lib/libc/port/locale -DNATIVE CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label @@ -376,7 +376,7 @@ locale/%/$(DTIME): locale/%/stamp UTF-8.cm: data/UTF-8.cm $(LN) -sf data/UTF-8.cm $@ -UTF-8.ct: $(UTF8SRCS) +UTF-8.ct: data/ctype.sh data/manual-input.UTF-8 $(UTF8SRCS) $(SH) data/ctype.sh $(UTF8SRCS) > $@ GB18030.cm: data/GB18030.cm diff --git a/usr/src/cmd/localedef/ctype.c b/usr/src/cmd/localedef/ctype.c index a0078072ba..18e308ccff 100644 --- a/usr/src/cmd/localedef/ctype.c +++ b/usr/src/cmd/localedef/ctype.c @@ -357,10 +357,12 @@ dump_ctype(void) if ((wc == ' ') && (ctn->ctype & (_ISPUNCT|_ISGRAPH))) conflict++; +#ifndef NATIVE if (conflict) { warn("conflicting classes for character 0x%x (%x)", wc, ctn->ctype); } +#endif /* * Handle the lower 256 characters using the simple * optimization. Note that if we have not defined the diff --git a/usr/src/cmd/localedef/data/ctype.sh b/usr/src/cmd/localedef/data/ctype.sh index d815b93590..771585828c 100644 --- a/usr/src/cmd/localedef/data/ctype.sh +++ b/usr/src/cmd/localedef/data/ctype.sh @@ -12,7 +12,7 @@ # # -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# Copyright 2017 Nexenta Systems, Inc. # # Combine LC_CTYPE classes from all .UTF-8.src files to be compiled by localedef @@ -43,4 +43,8 @@ for i in upper lower alpha space cntrl graph print punct digit xdigit blank \ sed "1 s,^,$i,;$ s,\([>)]\);/,\1," done +# Add the manually assembled definitions from FreeBSD +# (originally tools/tools/locale/etc/manual-input.UTF-8). +cat data/manual-input.UTF-8 + printf "\nEND LC_CTYPE\n" diff --git a/usr/src/cmd/localedef/data/manual-input.UTF-8 b/usr/src/cmd/localedef/data/manual-input.UTF-8 new file mode 100644 index 0000000000..929148b6cd --- /dev/null +++ b/usr/src/cmd/localedef/data/manual-input.UTF-8 @@ -0,0 +1,1070 @@ + +******* REMAINING DEFINITIONS ARE MANUALLY ASSEMBLED ******* + +blank +digit ;; +punct ;...;;/ + ;...;;/ + ;/ + ;...;;/ + ;...; +number ;...; +cntrl ;...; +graph ;...; + +punct ; +graph ; + +********************************************************************** +* Complete set of "special" characters +********************************************************************** + +special ;...;;/ + ;...;;/ + ;...;;/ + ;...;;/ + ;...;;/ + ;...;;/ + ;/ + ;/ + ;...;;/ + ;...; + +********************************************************************** +* Supplement generated sections with "number" classification +********************************************************************** + +digit ;...; +digit ;...; +digit ;...; +digit ;...; +number ;...; +digit ;...; +digit ;...; +digit ;...; +digit ;...; +number ;...; +digit ;...; +number ;...; +digit ;...; +digit ;...; +number ;...; +digit ;...; +digit ;...; +digit ;...; +number ;...; +digit ;...; +digit ;...; +digit ;...; +number ;...; +digit ;...; +number ;...; +digit ;...; +number ;...; +number ;...; +number ;...; +number ;...; +number ;...; +number ;...; +number ;...; +number ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;...;;/ + ;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + +number ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + +digit ;...; + +********************************************************************** +* 0x02B0 - 0x02FF Spacing Modification Letters +********************************************************************** + +graph ;...; +punct ;...;;/ + ;...;;/ + ;...;/ + +lower ;...;;/ + ;/ + ;/ + ;...;/ + + +********************************************************************** +* 0x0300 - 0x036F Combining Diacritical Marks +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x0300 - 0x0370 Coptic (Automatic section skips it) +********************************************************************** + +graph ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + +upper ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + +lower ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + +toupper (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,) +tolower (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,) + +********************************************************************** +* 0x0700 - 0x074F Syriac +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x0780 - 0x07BF Thaana +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x07C0 - 0x07FF Nko +********************************************************************** + +digit ;...; +graph ;...; + +********************************************************************** +* 0x0800 - 0x083F Samaritan +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x0840 - 0x085F Mandaic +********************************************************************** + +graph ;...;;/ + + +********************************************************************** +* 0x1400 - 0x167F Unified Canadian Aboriginal Syllabics +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x1680 - 0x169F Ogham +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x16A0 - 0x16FF Runic +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** +number ;...; + +********************************************************************** +* 0x1700 - 0x171F Tagalog +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x1720 - 0x173F Hanunoo +********************************************************************** + +graph ;...; + +*********************************************************************** +* 0x1740 - 0x175F Buhid +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x1760 - 0x177F Tagbanwa +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x1800 - 0x18AF Mongolian +********************************************************************** + +graph ;...;;/ + ;...;;/ + ;...;/ + +digit ;...; + +********************************************************************** +* 0x18B0 - 0x18FF Unified CA Aboriginal Syllabics Extended +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x1900 - 0x194F Limbu +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;;/ +* ;...;;/ +* ;...;;/ +* ;/ +* ;/ +* +* digit ;...; +********************************************************************** + +********************************************************************** +* 0x1950 - 0x197F Tai Le +********************************************************************** + +graph ;...;;/ + ;...; + +********************************************************************** +* 0x1980 - 0x19DF New Tai Le +********************************************************************** + +graph ;...;;/ + ;...;/ + ;/ + ;/ + +digit ;...; + +********************************************************************** +* 0x1A00 - 0x1A1F Buginese +********************************************************************** + +graph ;...;;/ + ;/ + + +********************************************************************** +* 0x1A20 - 0x1AAF Tai Tham +********************************************************************** + +graph ;...;;/ + ;...;;/ + ;/ + ;...; +digit ;...;;/ + ;...; + +********************************************************************** +* 0x1AB0 - 0x1AFF Combining Diacritical Marks Extended +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** +********************************************************************** +* 0x1B00 - 0x1B7F Balinese +********************************************************************** + +graph ;...;;/ + ;...; +digit ;...; + +********************************************************************** +* 0x1B80 - 0x1BBF Sundanese +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +* digit ;...; +********************************************************************** + +********************************************************************** +* 0x1BC0 - 0x1BFF Batak +********************************************************************** + +graph ;...;;/ + ;...; + +********************************************************************** +* 0x1C00 - 0x1C4F Lepcha +********************************************************************** + +graph ;...;;/ + ;...;;/ + ;...; +digit ;...; + +********************************************************************** +* 0x1C50 - 0x1C7F Ol Chiki +********************************************************************** + +graph ;...; +digit ;...; + +********************************************************************** +* 0x1CC0 - 0x1CCF Sundanese Supplement +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;/ +* +********************************************************************** + +********************************************************************** +* 0x1CD0 - 0x1CFF Vedic Extensions +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0x1DC0 - 0x1DFF Combining Diacritical Marks Supplement +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;;/ +* ;...;/ +* +********************************************************************** + +********************************************************************** +* 0x2000 - 0x206F General Punctuation +********************************************************************** + +space ;...;;/ + ;...; +punct ;...;;/ + ;...; + +********************************************************************** +* 0x2070 - 0x209F Superscripts and Subscripts +********************************************************************** + +graph ;...; +digit +digit ;...; +digit ;...; +punct ;...; +punct ;...; +lower ;/ + ;/ + ;...; + +********************************************************************** +* 0x20A0 - 0x20CF Currency Symbols +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated and remove current one +* punct ;...; +********************************************************************** +punct ;...; + +********************************************************************** +* 0x20D0 - 0x20FF Combining Diacritical Marks for Symbols +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x2100 - 0x214F Letterlike Symbols +********************************************************************** + +graph ;...; +punct ;/ + ;/ + ;...;;/ + ;/ + ;/ + ;/ + ;...;;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;...;;/ + ;...;;/ + +upper ;; +lower +alpha ;/ + ;/ + ;...;;/ + ;/ + ;...;;/ + ;/ + ;/ + ;/ + ;...;;/ + ;...;;/ + ;/ + ;...;;/ + ;...; +tolower (,);/ + (,);/ + (,) +toupper (,) + +********************************************************************** +* 0x2150 - 0x218F Number Forms (differential) +********************************************************************** + +number ;...;;/ + + +********************************************************************** +* 0x2190 - 0x21FF Arrows +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2200 - 0x22FF Mathematical Operators +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2300 - 0x23FF Miscellaneous Technical +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* punct ;...; +********************************************************************** + +********************************************************************** +* 0x2400 - 0x243F Control Pictures +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2440 - 0x245F Optical Character Recognition +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2460 - 0x24FF Enclosed Alphanumerics +********************************************************************** + +graph ;...; +digit ;...; +digit ;...; +digit ;...; +digit +digit ;...; +digit +xdigit ;...; +xdigit ;...; +number ;...; +number ;...; +number ;...; +number ;...; +number +lower ;...; +upper ;...; +lower ;...; +toupper (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,) +tolower (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,);/ + (,) + +********************************************************************** +* 0x2500 - 0x257F Box Drawing +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2580 - 0x259F Block Elements +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x25A0 - 0x25FF Geometric Shapes +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2600 - 0x26FF Miscellaneous symbols +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2700 - 0x27BF Dingbats +********************************************************************** + +graph ;...; +digit ;...; +number +digit ;...; +number +digit ;...; +number +********************************************************************** +* FIXME enable when CLDR is updated +* punct ;...;;/ +* ;...; +********************************************************************** + +********************************************************************** +* 0x27C0 - 0x27EF Miscellaneous Mathematical Symbols-A +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x27F0 - 0x27FF Supplemental Arrows-A +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2800 - 0x28FF Braille Patterns +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2900 - 0x297F Supplemental Arrows-B +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2980 - 0x29FF Miscellaneouis Mathematical Symbols-B +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2A00 - 0x2AFF Supplemental Mathematical Operators +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2B00 - 0x2BFF Miscellaneous Symbols and Arrows +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;;/ +* ;...;/ +* ;/ +* ;...;/ +* ;/ +* ;...; +* punct ;...;;/ +* ;...;/ +* ;/ +* ;...;/ +* ;/ +* ;...; +********************************************************************** + +********************************************************************** +* 0x2C00 - 0x2C5F Glagolitic +********************************************************************** + +graph ;...;/ + ;/ + ;...;/ + + +********************************************************************** +* 0x2C80 - 0x2CFF Coptic +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;;/ +* ;...; +* number +********************************************************************** + +********************************************************************** +* 0x2E00 - 0x2E7F Supplemental Punctuation +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* punct ;...; +********************************************************************** + +********************************************************************** +* 0x2E80 - 0x2EFF CJK Radicals Supplement +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2F00 - 0x2FDF Kangxi Radicals +********************************************************************** + +punct ;...; + +********************************************************************** +* 0x2FF0 - 0x2FFF Ideographic Description Characters +********************************************************************** + +punct ;...;/ + + +********************************************************************** +* 0x3000 - 0x30FF CJK Symbols and Punctuation +********************************************************************** + +space +graph ;...; +number ;/ + ;...;;/ + ;...; +alpha ;/ + ;/ + +punct ;...;;/ + ;...;;/ + ;...;/ + ;/ + ;...; + +********************************************************************** +* 0x3100 - 0x312F Bopomofo +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x3190 - 0x319F Kanbun +********************************************************************** + +graph ;...;/ + +number ;...;/ + +punct ;/ + ;/ + ;...;/ + + +********************************************************************** +* 0x31A0 - 0x31BF : Bopomofo Extended +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x31C0 - 0x31EF : CJK Strokes +********************************************************************** + +graph ;...; + +********************************************************************** +* 0x4DC0 - 0x4DFF Yijing Hexagram Symbols +********************************************************************** + +graph ;...; + +********************************************************************** +* 0xA4D0 - 0xA4FF Lisu +********************************************************************** + +graph ;...; + +********************************************************************** +* 0xA6A0 - 0xA6FF Bamum +********************************************************************** + +graph ;...; +number ;...; + +********************************************************************** +* 0xA700 - 0xA71F Modifier Tone Letters +********************************************************************** + +graph ;...;/ + + +********************************************************************** +* 0xA800 - 0xA82F Syloti Nagri +********************************************************************** + +graph ;...; + +********************************************************************** +* 0xA830 - 0x083F Common Indic Number Forms +********************************************************************** + +number ;...; +graph ;...; + +********************************************************************** +* 0xA840 - 0xA87F Phags-pa +********************************************************************** + +graph ;...; + +********************************************************************** +* 0xA880 - 0xA8DF Saurashra +********************************************************************** + +graph ;...;;/ + ;/ + +digit ;...; + +********************************************************************** +* 0xA900 - 0xA92F Kayah Li +********************************************************************** + +digit ;...; +graph ;...; + +********************************************************************** +* 0xA930 - 0xA95F Rejang +********************************************************************** + +graph ;...;;/ + + +********************************************************************** +* 0xA980 - 0xA9DF Javanese +********************************************************************** + +graph ;...;;/ + ;/ + ;/ + +digit ;...; + +********************************************************************** +* 0xAA00 - 0xAA5F Cham +********************************************************************** + +graph ;...;;/ + ;...;;/ + ;...; +digit ;...; + +********************************************************************** +* 0xAA80 - 0xAADF Tal Viet +********************************************************************** + +graph ;...;;/ + ;...; + +********************************************************************** +* 0xAAE0 - 0xAAFF Meetei Mayek Extensions +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0xABC0 - 0xABFF Meetei Mayek +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +* digit ;...; +********************************************************************** + +********************************************************************** +* 0xFB50 - 0xFDFF Arabic Presentation Forms (differential) +********************************************************************** + +punct ;/ + + +********************************************************************** +* 0xFE10 - 0xFE1F Vertical Forms +********************************************************************** + +graph ;...;/ + + +********************************************************************** +* 0xFE20 - 0xFE2F Combining Half Marks +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0xFE30 - 0xFE4F CJK Compatibility Forms +********************************************************************** + +punct ;...; + +********************************************************************** +* 0xFE50 - 0xFE6F Small Form Variants +********************************************************************** + +punct ;...; + +********************************************************************** +* 0xFE70 - 0xFEFF Arabic Presentation Forms-B (differential) +********************************************************************** + +blank + +********************************************************************** +* 0x10300 - 0x1032F Old Italic +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +* number ;...; +********************************************************************** + +********************************************************************** +* 0x10330 - 0x1034F Gothic +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +* number +********************************************************************** + +********************************************************************** +* 0x1D100 - 0x1D1FF Musical Symbols +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* punct ;...;;/ +* ;...;;/ +* +* cntrl ;...; +* graph ;...; +********************************************************************** + +********************************************************************** +* 0x1D400 - 0x1D7FF Mathematical Alphanumeric Symbols +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0x1F600 - 0x1F64F Emoticons (Emoji) +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0x1F680 - 0x1F6FF Transport and Map Symbols +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...; +********************************************************************** + +********************************************************************** +* 0x1F700 - 0x1F77F Alchemical Symbols +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;/ +* +********************************************************************** + +********************************************************************** +* 0x1F800 - 0x1F8FF Supplemental Arrows-C +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* graph ;...;/ +* +********************************************************************** + +********************************************************************** +* 0x20000 - 0x2A6D6 CJK Unified Ideographs Extension B +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* alpha ;...; +********************************************************************** + +********************************************************************** +* 0x2A700 - 0x2B734 CJK Unified Ideographs Extension C +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* alpha ;...; +********************************************************************** + +********************************************************************** +* 0x2B740 - 0x2B81D CJK Unified Ideographs Extension D +********************************************************************** + +********************************************************************** +* FIXME enable when CLDR is updated +* alpha ;...; +********************************************************************** -- 2.11.4.GIT