From patchwork Wed Jun 25 08:29:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pravin Satpute X-Patchwork-Id: 1711 Received: (qmail 31221 invoked by alias); 25 Jun 2014 08:30:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 31201 invoked by uid 89); 25 Jun 2014 08:30:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_40, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx4-phx2.redhat.com Date: Wed, 25 Jun 2014 04:29:44 -0400 (EDT) From: Pravin Satpute To: "Joseph S. Myers" Cc: libc-alpha@sourceware.org, "Carlos O'Donell" Message-ID: <1227269003.32244068.1403684984863.JavaMail.zimbra@redhat.com> In-Reply-To: References: <53A5DCA3.4010108@redhat.com> Subject: Re: [PATCH] [BZ 14094] Update locale data to Unicode 7.0.0 MIME-Version: 1.0 Version2 of Patch. >----- Original Message ----- >From: "Joseph S. Myers" >To: "Pravin Satpute" >Cc: libc-alpha@sourceware.org, "Carlos O'Donell" >Sent: Sunday, June 22, 2014 2:34:30 AM >Subject: Re: [PATCH] [BZ 14094] Update locale data to Unicode 7.0.0 >>On Sun, 22 Jun 2014, Pravin Satpute wrote: >> A. Process for updating locales/i18n ctype with new Unicode release is >> documented @ [1], I think it should get added either in WIKI, or docs >> folder of glibc. >The process should ideally be running a single command - no manual editing >at all. (That command might be a script that wraps some other commands.) >If tempted to write instructions for running a sequence of commands and >editing the result, writing a script to automate that is better. Now, we have single script. scripts/ctype-gen.sh, It generates unicode-ctype file. Only for creating patch we need to copy content of unicode-ctype to i18n file. >> Report/Analysis for backward compatibility is available AT >> backward-compatibility5_1-to-7_0 [3] >That report is a very useful starting point, but doesn't seem to explain >things at the human level. What changes have there been to previously >supported characters, and why, in terms of Unicode character properties, >are those changes correct changes? Maybe something more verbose that >names the characters individually and states what the old ctype >information was, and what the new information is, and what the relevant >Unicode proeprties are that explain the new information, would help. Improved report available AT https://github.com/pravins/glibc-i18n/blob/master/unicode7-0/ctype-compatibility5_1-to-7_0 >You're changing how upper/lower/alpha properties are generated. Does that >fix bug 14010? If so, you can include [BZ #14010] in your ChangeLog >entry. Does it obsolete the special cases in >gen-unicode-ctype.c:is_alpha? If so, you should remove the parts of >gen-unicode-ctype.c that are no longer used. You should also confirm that >each of the special cases there is properly handled by the new logic - or >state explicitly that the handling of certain identified characters with >special cases is being deliberately changed, because the Unicode >properties for those characters are better than the special-case handling. These classes now disable in gen-unicode-ctype.c and also moved this file to scripts/ >> >> /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) / >> - Unicode 6.0. */ >> -#define __STDC_ISO_10646__ 201103L >> + Unicode 6.0. >> + Unicode 7.0.0 Published on 2014 June 16 */ >> +#define __STDC_ISO_10646__ 201406L >maybe put 201304L there until such an amendment is published. Done. Thanks for pointer. >> diff --git a/scripts/check-backcompatibility.py b/scripts/check-backcompatibility.py >> new file mode 100755 >> index 0000000..a56ac0a >> --- /dev/null >> +++ b/scripts/check-backcompatibility.py >I think in scripts/ the name should be more specific about *what* is >having compatibility checked - scripts/ is for all of glibc, not just >locale data. Now script name is check-compatibility.py I think starting name of scripts with ctype will help to identify them quickly. >> +# Copyright (C) 2013-14, Pravin Satpute >glibc contributions should be assigned to the FSF (and miscellaneous >programs would normally by GPLv2+ / LGPLv2.1+ unless there is some reason >to deviate from the norm for such programs in glibc). Done. Let me know if anything more missing. Thanks, Pravin Satpute From 4c677f7b72bcd7e4e94294b7bb5f2902ed08ea11 Mon Sep 17 00:00:00 2001 From: Pravin Satpute Date: Wed, 25 Jun 2014 11:54:30 +0530 Subject: [PATCH] Resolves #14094 and #14010 --- ChangeLog | 20 + include/stdc-predef.h | 6 +- localedata/ChangeLog | 4 + localedata/gen-unicode-ctype.c | 784 ----------- localedata/locales/i18n | 2822 +++++++++++++++++++++----------------- scripts/ctype-compatibility.py | 213 +++ scripts/ctype-gen.sh | 29 + scripts/gen-unicode-ctype-dcp.py | 98 ++ scripts/gen-unicode-ctype.c | 791 +++++++++++ 9 files changed, 2703 insertions(+), 2064 deletions(-) delete mode 100644 localedata/gen-unicode-ctype.c create mode 100755 scripts/ctype-compatibility.py create mode 100755 scripts/ctype-gen.sh create mode 100755 scripts/gen-unicode-ctype-dcp.py create mode 100644 scripts/gen-unicode-ctype.c diff --git a/ChangeLog b/ChangeLog index 9409918..1557a73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2014-06-25 Pravin Satpute + + * scripts/gen-unicode-ctype.c: Program moved from + localedate to scripts. + + * scripts/gen-unicode-ctype.c: Disabled upper, lower + alpha and outdigit classes. + + * scripts/gen-unicode-ctype-dcp.py: New script for + generating locales/i18n upper, lower and alpha ctype from + DerivedCoreProperties.txt + + * scripts/ctype-gen.sh: Shell script to generate LC_CTYPE for + new Unicode version. + + * scripts/ctype-compatibility.py: Script for testing + testing backward compatibility of LC_CTYPE locales/i18n. + + * include/stdc-predef.h: Updated for latest ISO/IEC 10646 amendment. + 2014-06-25 Siddhesh Poyarekar [BZ #17086] diff --git a/include/stdc-predef.h b/include/stdc-predef.h index 87e3666..d1f5989 100644 --- a/include/stdc-predef.h +++ b/include/stdc-predef.h @@ -49,9 +49,9 @@ # define __STDC_IEC_559_COMPLEX__ 1 #endif -/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) / - Unicode 6.0. */ -#define __STDC_ISO_10646__ 201103L +/* wchar_t uses ISO/IEC 10646 amendment published 2013-04-15) / + */ +#define __STDC_ISO_10646__ 201304L /* We do not support C11 . */ #define __STDC_NO_THREADS__ 1 diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 9dd3cf2..13e9bee 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ + 2014-06-25 Pravin Satpute + [BZ #14094 #14010] + * locales/i18n: Updated to Unicode 7.0.0 + 2014-06-20 Stefan Liebler * Makefile (LOCALES): Add en_GB.UTF-8. diff --git a/localedata/gen-unicode-ctype.c b/localedata/gen-unicode-ctype.c deleted file mode 100644 index 0c001b2..0000000 --- a/localedata/gen-unicode-ctype.c +++ /dev/null @@ -1,784 +0,0 @@ -/* Generate a Unicode conforming LC_CTYPE category from a UnicodeData file. - Copyright (C) 2000-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Bruno Haible , 2000. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* Usage example: - $ gen-unicode /usr/local/share/Unidata/UnicodeData.txt 3.1 - */ - -#include -#include -#include -#include -#include - -/* This structure represents one line in the UnicodeData.txt file. */ -struct unicode_attribute -{ - const char *name; /* Character name */ - const char *category; /* General category */ - const char *combining; /* Canonical combining classes */ - const char *bidi; /* Bidirectional category */ - const char *decomposition; /* Character decomposition mapping */ - const char *decdigit; /* Decimal digit value */ - const char *digit; /* Digit value */ - const char *numeric; /* Numeric value */ - int mirrored; /* mirrored */ - const char *oldname; /* Old Unicode 1.0 name */ - const char *comment; /* Comment */ - unsigned int upper; /* Uppercase mapping */ - unsigned int lower; /* Lowercase mapping */ - unsigned int title; /* Titlecase mapping */ -}; - -/* Missing fields are represented with "" for strings, and NONE for - characters. */ -#define NONE (~(unsigned int)0) - -/* The entire contents of the UnicodeData.txt file. */ -struct unicode_attribute unicode_attributes [0x110000]; - -/* Stores in unicode_attributes[i] the values from the given fields. */ -static void -fill_attribute (unsigned int i, - const char *field1, const char *field2, - const char *field3, const char *field4, - const char *field5, const char *field6, - const char *field7, const char *field8, - const char *field9, const char *field10, - const char *field11, const char *field12, - const char *field13, const char *field14) -{ - struct unicode_attribute * uni; - - if (i >= 0x110000) - { - fprintf (stderr, "index too large\n"); - exit (1); - } - if (strcmp (field2, "Cs") == 0) - /* Surrogates are UTF-16 artefacts, not real characters. Ignore them. */ - return; - uni = &unicode_attributes[i]; - /* Copy the strings. */ - uni->name = strdup (field1); - uni->category = (field2[0] == '\0' ? "" : strdup (field2)); - uni->combining = (field3[0] == '\0' ? "" : strdup (field3)); - uni->bidi = (field4[0] == '\0' ? "" : strdup (field4)); - uni->decomposition = (field5[0] == '\0' ? "" : strdup (field5)); - uni->decdigit = (field6[0] == '\0' ? "" : strdup (field6)); - uni->digit = (field7[0] == '\0' ? "" : strdup (field7)); - uni->numeric = (field8[0] == '\0' ? "" : strdup (field8)); - uni->mirrored = (field9[0] == 'Y'); - uni->oldname = (field10[0] == '\0' ? "" : strdup (field10)); - uni->comment = (field11[0] == '\0' ? "" : strdup (field11)); - uni->upper = (field12[0] =='\0' ? NONE : strtoul (field12, NULL, 16)); - uni->lower = (field13[0] =='\0' ? NONE : strtoul (field13, NULL, 16)); - uni->title = (field14[0] =='\0' ? NONE : strtoul (field14, NULL, 16)); -} - -/* Maximum length of a field in the UnicodeData.txt file. */ -#define FIELDLEN 120 - -/* Reads the next field from STREAM. The buffer BUFFER has size FIELDLEN. - Reads up to (but excluding) DELIM. - Returns 1 when a field was successfully read, otherwise 0. */ -static int -getfield (FILE *stream, char *buffer, int delim) -{ - int count = 0; - int c; - - for (; (c = getc (stream)), (c != EOF && c != delim); ) - { - /* The original unicode.org UnicodeData.txt file happens to have - CR/LF line terminators. Silently convert to LF. */ - if (c == '\r') - continue; - - /* Put c into the buffer. */ - if (++count >= FIELDLEN - 1) - { - fprintf (stderr, "field too long\n"); - exit (1); - } - *buffer++ = c; - } - - if (c == EOF) - return 0; - - *buffer = '\0'; - return 1; -} - -/* Stores in unicode_attributes[] the entire contents of the UnicodeData.txt - file. */ -static void -fill_attributes (const char *unicodedata_filename) -{ - unsigned int i, j; - FILE *stream; - char field0[FIELDLEN]; - char field1[FIELDLEN]; - char field2[FIELDLEN]; - char field3[FIELDLEN]; - char field4[FIELDLEN]; - char field5[FIELDLEN]; - char field6[FIELDLEN]; - char field7[FIELDLEN]; - char field8[FIELDLEN]; - char field9[FIELDLEN]; - char field10[FIELDLEN]; - char field11[FIELDLEN]; - char field12[FIELDLEN]; - char field13[FIELDLEN]; - char field14[FIELDLEN]; - int lineno = 0; - - for (i = 0; i < 0x110000; i++) - unicode_attributes[i].name = NULL; - - stream = fopen (unicodedata_filename, "r"); - if (stream == NULL) - { - fprintf (stderr, "error during fopen of '%s'\n", unicodedata_filename); - exit (1); - } - - for (;;) - { - int n; - - lineno++; - n = getfield (stream, field0, ';'); - n += getfield (stream, field1, ';'); - n += getfield (stream, field2, ';'); - n += getfield (stream, field3, ';'); - n += getfield (stream, field4, ';'); - n += getfield (stream, field5, ';'); - n += getfield (stream, field6, ';'); - n += getfield (stream, field7, ';'); - n += getfield (stream, field8, ';'); - n += getfield (stream, field9, ';'); - n += getfield (stream, field10, ';'); - n += getfield (stream, field11, ';'); - n += getfield (stream, field12, ';'); - n += getfield (stream, field13, ';'); - n += getfield (stream, field14, '\n'); - if (n == 0) - break; - if (n != 15) - { - fprintf (stderr, "short line in'%s':%d\n", - unicodedata_filename, lineno); - exit (1); - } - i = strtoul (field0, NULL, 16); - if (field1[0] == '<' - && strlen (field1) >= 9 - && !strcmp (field1 + strlen(field1) - 8, ", First>")) - { - /* Deal with a range. */ - lineno++; - n = getfield (stream, field0, ';'); - n += getfield (stream, field1, ';'); - n += getfield (stream, field2, ';'); - n += getfield (stream, field3, ';'); - n += getfield (stream, field4, ';'); - n += getfield (stream, field5, ';'); - n += getfield (stream, field6, ';'); - n += getfield (stream, field7, ';'); - n += getfield (stream, field8, ';'); - n += getfield (stream, field9, ';'); - n += getfield (stream, field10, ';'); - n += getfield (stream, field11, ';'); - n += getfield (stream, field12, ';'); - n += getfield (stream, field13, ';'); - n += getfield (stream, field14, '\n'); - if (n != 15) - { - fprintf (stderr, "missing end range in '%s':%d\n", - unicodedata_filename, lineno); - exit (1); - } - if (!(field1[0] == '<' - && strlen (field1) >= 8 - && !strcmp (field1 + strlen (field1) - 7, ", Last>"))) - { - fprintf (stderr, "missing end range in '%s':%d\n", - unicodedata_filename, lineno); - exit (1); - } - field1[strlen (field1) - 7] = '\0'; - j = strtoul (field0, NULL, 16); - for (; i <= j; i++) - fill_attribute (i, field1+1, field2, field3, field4, field5, - field6, field7, field8, field9, field10, - field11, field12, field13, field14); - } - else - { - /* Single character line */ - fill_attribute (i, field1, field2, field3, field4, field5, - field6, field7, field8, field9, field10, - field11, field12, field13, field14); - } - } - if (ferror (stream) || fclose (stream)) - { - fprintf (stderr, "error reading from '%s'\n", unicodedata_filename); - exit (1); - } -} - -/* Character mappings. */ - -static unsigned int -to_upper (unsigned int ch) -{ - if (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].upper != NONE) - return unicode_attributes[ch].upper; - else - return ch; -} - -static unsigned int -to_lower (unsigned int ch) -{ - if (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].lower != NONE) - return unicode_attributes[ch].lower; - else - return ch; -} - -static unsigned int -to_title (unsigned int ch) -{ - if (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].title != NONE) - return unicode_attributes[ch].title; - else - return ch; -} - -/* Character class properties. */ - -static bool -is_upper (unsigned int ch) -{ - return (to_lower (ch) != ch); -} - -static bool -is_lower (unsigned int ch) -{ - return (to_upper (ch) != ch) - /* is lowercase, but without simple to_upper mapping. */ - || (ch == 0x00DF); -} - -static bool -is_alpha (unsigned int ch) -{ - return (unicode_attributes[ch].name != NULL - && ((unicode_attributes[ch].category[0] == 'L' - /* Theppitak Karoonboonyanan says - , should belong to is_punct. */ - && (ch != 0x0E2F) && (ch != 0x0E46)) - /* Theppitak Karoonboonyanan says - , .., .. are is_alpha. */ - || (ch == 0x0E31) - || (ch >= 0x0E34 && ch <= 0x0E3A) - || (ch >= 0x0E47 && ch <= 0x0E4E) - /* Avoid warning for . */ - || (ch == 0x0345) - /* Avoid warnings for ... */ - || (unicode_attributes[ch].category[0] == 'N' - && unicode_attributes[ch].category[1] == 'l') - /* Avoid warnings for ... */ - || (unicode_attributes[ch].category[0] == 'S' - && unicode_attributes[ch].category[1] == 'o' - && strstr (unicode_attributes[ch].name, " LETTER ") - != NULL) - /* Consider all the non-ASCII digits as alphabetic. - ISO C 99 forbids us to have them in category "digit", - but we want iswalnum to return true on them. */ - || (unicode_attributes[ch].category[0] == 'N' - && unicode_attributes[ch].category[1] == 'd' - && !(ch >= 0x0030 && ch <= 0x0039)))); -} - -static bool -is_digit (unsigned int ch) -{ -#if 0 - return (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'N' - && unicode_attributes[ch].category[1] == 'd'); - /* Note: U+0BE7..U+0BEF and U+1369..U+1371 are digit systems without - a zero. Must add <0> in front of them by hand. */ -#else - /* SUSV2 gives us some freedom for the "digit" category, but ISO C 99 - takes it away: - 7.25.2.1.5: - The iswdigit function tests for any wide character that corresponds - to a decimal-digit character (as defined in 5.2.1). - 5.2.1: - the 10 decimal digits 0 1 2 3 4 5 6 7 8 9 - */ - return (ch >= 0x0030 && ch <= 0x0039); -#endif -} - -static bool -is_outdigit (unsigned int ch) -{ - return (ch >= 0x0030 && ch <= 0x0039); -} - -static bool -is_blank (unsigned int ch) -{ - return (ch == 0x0009 /* '\t' */ - /* Category Zs without mention of "" */ - || (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'Z' - && unicode_attributes[ch].category[1] == 's' - && !strstr (unicode_attributes[ch].decomposition, ""))); -} - -static bool -is_space (unsigned int ch) -{ - /* Don't make U+00A0 a space. Non-breaking space means that all programs - should treat it like a punctuation character, not like a space. */ - return (ch == 0x0020 /* ' ' */ - || ch == 0x000C /* '\f' */ - || ch == 0x000A /* '\n' */ - || ch == 0x000D /* '\r' */ - || ch == 0x0009 /* '\t' */ - || ch == 0x000B /* '\v' */ - /* Categories Zl, Zp, and Zs without mention of "" */ - || (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'Z' - && (unicode_attributes[ch].category[1] == 'l' - || unicode_attributes[ch].category[1] == 'p' - || (unicode_attributes[ch].category[1] == 's' - && !strstr (unicode_attributes[ch].decomposition, - ""))))); -} - -static bool -is_cntrl (unsigned int ch) -{ - return (unicode_attributes[ch].name != NULL - && (!strcmp (unicode_attributes[ch].name, "") - /* Categories Zl and Zp */ - || (unicode_attributes[ch].category[0] == 'Z' - && (unicode_attributes[ch].category[1] == 'l' - || unicode_attributes[ch].category[1] == 'p')))); -} - -static bool -is_xdigit (unsigned int ch) -{ -#if 0 - return is_digit (ch) - || (ch >= 0x0041 && ch <= 0x0046) - || (ch >= 0x0061 && ch <= 0x0066); -#else - /* SUSV2 gives us some freedom for the "xdigit" category, but ISO C 99 - takes it away: - 7.25.2.1.12: - The iswxdigit function tests for any wide character that corresponds - to a hexadecimal-digit character (as defined in 6.4.4.1). - 6.4.4.1: - hexadecimal-digit: one of 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F - */ - return (ch >= 0x0030 && ch <= 0x0039) - || (ch >= 0x0041 && ch <= 0x0046) - || (ch >= 0x0061 && ch <= 0x0066); -#endif -} - -static bool -is_graph (unsigned int ch) -{ - return (unicode_attributes[ch].name != NULL - && strcmp (unicode_attributes[ch].name, "") - && !is_space (ch)); -} - -static bool -is_print (unsigned int ch) -{ - return (unicode_attributes[ch].name != NULL - && strcmp (unicode_attributes[ch].name, "") - /* Categories Zl and Zp */ - && !(unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'Z' - && (unicode_attributes[ch].category[1] == 'l' - || unicode_attributes[ch].category[1] == 'p'))); -} - -static bool -is_punct (unsigned int ch) -{ -#if 0 - return (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'P'); -#else - /* The traditional POSIX definition of punctuation is every graphic, - non-alphanumeric character. */ - return (is_graph (ch) && !is_alpha (ch) && !is_digit (ch)); -#endif -} - -static bool -is_combining (unsigned int ch) -{ - /* Up to Unicode 3.0.1 we took the Combining property from the PropList.txt - file. In 3.0.1 it was identical to the union of the general categories - "Mn", "Mc", "Me". In Unicode 3.1 this property has been dropped from the - PropList.txt file, so we take the latter definition. */ - return (unicode_attributes[ch].name != NULL - && unicode_attributes[ch].category[0] == 'M' - && (unicode_attributes[ch].category[1] == 'n' - || unicode_attributes[ch].category[1] == 'c' - || unicode_attributes[ch].category[1] == 'e')); -} - -static bool -is_combining_level3 (unsigned int ch) -{ - return is_combining (ch) - && !(unicode_attributes[ch].combining[0] != '\0' - && unicode_attributes[ch].combining[0] != '0' - && strtoul (unicode_attributes[ch].combining, NULL, 10) >= 200); -} - -/* Return the UCS symbol string for a Unicode character. */ -static const char * -ucs_symbol (unsigned int i) -{ - static char buf[11+1]; - - sprintf (buf, (i < 0x10000 ? "" : ""), i); - return buf; -} - -/* Return the UCS symbol range string for a Unicode characters interval. */ -static const char * -ucs_symbol_range (unsigned int low, unsigned int high) -{ - static char buf[24+1]; - - strcpy (buf, ucs_symbol (low)); - strcat (buf, ".."); - strcat (buf, ucs_symbol (high)); - return buf; -} - -/* Output a character class (= property) table. */ - -static void -output_charclass (FILE *stream, const char *classname, - bool (*func) (unsigned int)) -{ - char table[0x110000]; - unsigned int i; - bool need_semicolon; - const int max_column = 75; - int column; - - for (i = 0; i < 0x110000; i++) - table[i] = (int) func (i); - - fprintf (stream, "%s ", classname); - need_semicolon = false; - column = 1000; - for (i = 0; i < 0x110000; ) - { - if (!table[i]) - i++; - else - { - unsigned int low, high; - char buf[25]; - - low = i; - do - i++; - while (i < 0x110000 && table[i]); - high = i - 1; - - if (low == high) - strcpy (buf, ucs_symbol (low)); - else - strcpy (buf, ucs_symbol_range (low, high)); - - if (need_semicolon) - { - fprintf (stream, ";"); - column++; - } - - if (column + strlen (buf) > max_column) - { - fprintf (stream, "/\n "); - column = 3; - } - - fprintf (stream, "%s", buf); - column += strlen (buf); - need_semicolon = true; - } - } - fprintf (stream, "\n"); -} - -/* Output a character mapping table. */ - -static void -output_charmap (FILE *stream, const char *mapname, - unsigned int (*func) (unsigned int)) -{ - char table[0x110000]; - unsigned int i; - bool need_semicolon; - const int max_column = 75; - int column; - - for (i = 0; i < 0x110000; i++) - table[i] = (func (i) != i); - - fprintf (stream, "%s ", mapname); - need_semicolon = false; - column = 1000; - for (i = 0; i < 0x110000; i++) - if (table[i]) - { - char buf[25+1]; - - strcpy (buf, "("); - strcat (buf, ucs_symbol (i)); - strcat (buf, ","); - strcat (buf, ucs_symbol (func (i))); - strcat (buf, ")"); - - if (need_semicolon) - { - fprintf (stream, ";"); - column++; - } - - if (column + strlen (buf) > max_column) - { - fprintf (stream, "/\n "); - column = 3; - } - - fprintf (stream, "%s", buf); - column += strlen (buf); - need_semicolon = true; - } - fprintf (stream, "\n"); -} - -/* Output the width table. */ - -static void -output_widthmap (FILE *stream) -{ -} - -/* Output the tables to the given file. */ - -static void -output_tables (const char *filename, const char *version) -{ - FILE *stream; - unsigned int ch; - - stream = fopen (filename, "w"); - if (stream == NULL) - { - fprintf (stderr, "cannot open '%s' for writing\n", filename); - exit (1); - } - - fprintf (stream, "escape_char /\n"); - fprintf (stream, "comment_char %%\n"); - fprintf (stream, "\n"); - fprintf (stream, "%% Generated automatically by gen-unicode-ctype for Unicode %s.\n", - version); - fprintf (stream, "\n"); - - fprintf (stream, "LC_IDENTIFICATION\n"); - fprintf (stream, "title \"Unicode %s FDCC-set\"\n", version); - fprintf (stream, "source \"UnicodeData.txt, PropList.txt\"\n"); - fprintf (stream, "address \"\"\n"); - fprintf (stream, "contact \"\"\n"); - fprintf (stream, "email \"bug-glibc-locales@gnu.org\"\n"); - fprintf (stream, "tel \"\"\n"); - fprintf (stream, "fax \"\"\n"); - fprintf (stream, "language \"\"\n"); - fprintf (stream, "territory \"Earth\"\n"); - fprintf (stream, "revision \"%s\"\n", version); - { - time_t now; - char date[11]; - now = time (NULL); - strftime (date, sizeof (date), "%Y-%m-%d", gmtime (&now)); - fprintf (stream, "date \"%s\"\n", date); - } - fprintf (stream, "category \"unicode:2001\";LC_CTYPE\n"); - fprintf (stream, "END LC_IDENTIFICATION\n"); - fprintf (stream, "\n"); - - /* Verifications. */ - for (ch = 0; ch < 0x110000; ch++) - { - /* toupper restriction: "Only characters specified for the keywords - lower and upper shall be specified. */ - if (to_upper (ch) != ch && !(is_lower (ch) || is_upper (ch))) - fprintf (stderr, - "%s is not upper|lower but toupper(0x%04X) = 0x%04X\n", - ucs_symbol (ch), ch, to_upper (ch)); - - /* tolower restriction: "Only characters specified for the keywords - lower and upper shall be specified. */ - if (to_lower (ch) != ch && !(is_lower (ch) || is_upper (ch))) - fprintf (stderr, - "%s is not upper|lower but tolower(0x%04X) = 0x%04X\n", - ucs_symbol (ch), ch, to_lower (ch)); - - /* alpha restriction: "Characters classified as either upper or lower - shall automatically belong to this class. */ - if ((is_lower (ch) || is_upper (ch)) && !is_alpha (ch)) - fprintf (stderr, "%s is upper|lower but not alpha\n", ucs_symbol (ch)); - - /* alpha restriction: "No character specified for the keywords cntrl, - digit, punct or space shall be specified." */ - if (is_alpha (ch) && is_cntrl (ch)) - fprintf (stderr, "%s is alpha and cntrl\n", ucs_symbol (ch)); - if (is_alpha (ch) && is_digit (ch)) - fprintf (stderr, "%s is alpha and digit\n", ucs_symbol (ch)); - if (is_alpha (ch) && is_punct (ch)) - fprintf (stderr, "%s is alpha and punct\n", ucs_symbol (ch)); - if (is_alpha (ch) && is_space (ch)) - fprintf (stderr, "%s is alpha and space\n", ucs_symbol (ch)); - - /* space restriction: "No character specified for the keywords upper, - lower, alpha, digit, graph or xdigit shall be specified." - upper, lower, alpha already checked above. */ - if (is_space (ch) && is_digit (ch)) - fprintf (stderr, "%s is space and digit\n", ucs_symbol (ch)); - if (is_space (ch) && is_graph (ch)) - fprintf (stderr, "%s is space and graph\n", ucs_symbol (ch)); - if (is_space (ch) && is_xdigit (ch)) - fprintf (stderr, "%s is space and xdigit\n", ucs_symbol (ch)); - - /* cntrl restriction: "No character specified for the keywords upper, - lower, alpha, digit, punct, graph, print or xdigit shall be - specified." upper, lower, alpha already checked above. */ - if (is_cntrl (ch) && is_digit (ch)) - fprintf (stderr, "%s is cntrl and digit\n", ucs_symbol (ch)); - if (is_cntrl (ch) && is_punct (ch)) - fprintf (stderr, "%s is cntrl and punct\n", ucs_symbol (ch)); - if (is_cntrl (ch) && is_graph (ch)) - fprintf (stderr, "%s is cntrl and graph\n", ucs_symbol (ch)); - if (is_cntrl (ch) && is_print (ch)) - fprintf (stderr, "%s is cntrl and print\n", ucs_symbol (ch)); - if (is_cntrl (ch) && is_xdigit (ch)) - fprintf (stderr, "%s is cntrl and xdigit\n", ucs_symbol (ch)); - - /* punct restriction: "No character specified for the keywords upper, - lower, alpha, digit, cntrl, xdigit or as the character shall - be specified." upper, lower, alpha, cntrl already checked above. */ - if (is_punct (ch) && is_digit (ch)) - fprintf (stderr, "%s is punct and digit\n", ucs_symbol (ch)); - if (is_punct (ch) && is_xdigit (ch)) - fprintf (stderr, "%s is punct and xdigit\n", ucs_symbol (ch)); - if (is_punct (ch) && (ch == 0x0020)) - fprintf (stderr, "%s is punct\n", ucs_symbol (ch)); - - /* graph restriction: "No character specified for the keyword cntrl - shall be specified." Already checked above. */ - - /* print restriction: "No character specified for the keyword cntrl - shall be specified." Already checked above. */ - - /* graph - print relation: differ only in the character. - How is this possible if there are more than one space character?! - I think susv2/xbd/locale.html should speak of "space characters", - not "space character". */ - if (is_print (ch) && !(is_graph (ch) || /* ch == 0x0020 */ is_space (ch))) - fprintf (stderr, - "%s is print but not graph|\n", ucs_symbol (ch)); - if (!is_print (ch) && (is_graph (ch) || ch == 0x0020)) - fprintf (stderr, - "%s is graph| but not print\n", ucs_symbol (ch)); - } - - fprintf (stream, "LC_CTYPE\n"); - output_charclass (stream, "upper", is_upper); - output_charclass (stream, "lower", is_lower); - output_charclass (stream, "alpha", is_alpha); - output_charclass (stream, "digit", is_digit); - output_charclass (stream, "outdigit", is_outdigit); - output_charclass (stream, "blank", is_blank); - output_charclass (stream, "space", is_space); - output_charclass (stream, "cntrl", is_cntrl); - output_charclass (stream, "punct", is_punct); - output_charclass (stream, "xdigit", is_xdigit); - output_charclass (stream, "graph", is_graph); - output_charclass (stream, "print", is_print); - output_charclass (stream, "class \"combining\";", is_combining); - output_charclass (stream, "class \"combining_level3\";", is_combining_level3); - output_charmap (stream, "toupper", to_upper); - output_charmap (stream, "tolower", to_lower); - output_charmap (stream, "map \"totitle\";", to_title); - output_widthmap (stream); - fprintf (stream, "END LC_CTYPE\n"); - - if (ferror (stream) || fclose (stream)) - { - fprintf (stderr, "error writing to '%s'\n", filename); - exit (1); - } -} - -int -main (int argc, char * argv[]) -{ - if (argc != 3) - { - fprintf (stderr, "Usage: %s UnicodeData.txt version\n", argv[0]); - exit (1); - } - - fill_attributes (argv[1]); - - output_tables ("unicode", argv[2]); - - return 0; -} diff --git a/localedata/locales/i18n b/localedata/locales/i18n index 4f8b9e1..89092db 100644 --- a/localedata/locales/i18n +++ b/localedata/locales/i18n @@ -12,7 +12,7 @@ fax "" language "" territory "" revision "" -date "2008-04-13" +date "2014-06-24" % category "i18n:2000";LC_IDENTIFICATION category "i18n:2000";LC_CTYPE @@ -30,734 +30,757 @@ END LC_IDENTIFICATION LC_CTYPE % The following is the 14652 i18n fdcc-set LC_CTYPE category. -% It covers Unicode version 5.0.0. +% It covers Unicode version 7.0.0. % The character classes and mapping tables were automatically generated -% using the gen-unicode-ctype.c program. +% using the ctype-gen.sh script. -% The "upper" class reflects the uppercase characters of class "alpha" -upper / -% BASIC LATIN/ - ..;/ -% LATIN-1 SUPPLEMENT/ - ..;..;/ -% LATIN EXTENDED-A/ - ..(2)..;/ - ..(2)..;/ - ..(2)..;/ - ..(2)..;/ -% LATIN EXTENDED-B/ - ;..(2)..;;/ - ..;..;;;/ - ..;;;;/ - ..(2)..;/ - ;;;;;;..;/ - ;;;;;;;;/ - ;;/ - ..(2)..;/ - ..(2)..;/ - ;;;..;..(2)..;/ - ..(2)..;/ - ;;;;/ - ;..;;;;;/ -% BASIC GREEK/ - ;;;/ - ;..;;;;..;/ - ..;..(2)..;/ -% GREEK SYMBOLS AND COPTIC/ - ..(2)..;;/ - ;..;..;/ -% CYRILLIC/ - ..;..(2)..;/ - ;..(2)..;;..(2)..;/ - ..(2)..;/ -% CYRILLIC SUPPLEMENT/ - ..(2)..;/ -% ARMENIAN/ - ..;/ -% GEORGIAN/ -% is not addressed as the letters does not have a uppercase/lowercase relation/ -% well, there are three georgian blocks defined; one caseless (the one usually/ -% used), one defined as uppercase and one as lowercase. defining the uppercase one here/ - ..;/ -% LATIN EXTENDED ADDITIONAL/ - ..(2)..;/ - ..(2)..;;/ - ..(2)..;/ -% GREEK EXTENDED/ - ..;..;..;..;/ - ..;..(2)..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ -% LETTERLIKE SYMBOLS/ - ;..;/ - ;/ -% NUMBER FORMS/ - ..;/ - ;/ -% ENCLOSED ALPHANUMERICS/ - ..;/ -% GLAGOLITIC/ - ..;/ -% LATIN EXTENDED-C/ - ;..;..(2)..;..;/ - ;;;/ -% COPTIC/ - ..(2)..;/ -% CYRILLIC SUPPLEMENT 2/ - ..(2)..;..(2)..;..(2)..;/ -% LATIN EXTENDED-D/ - ..(2)..;..(2)..;..(2)..;/ - ..(2)..;/ -% HALFWIDTH AND FULLWIDTH FORMS/ - ..;/ -% DESERET/ - .. - -% The "lower" class reflects the lowercase characters of class "alpha" -lower / -% BASIC LATIN/ - ..;/ -% LATIN-1 SUPPLEMENT/ - ;..;..;/ -% LATIN EXTENDED-A/ - ..(2)..;..(2)..;/ - ..(2)..;..(2)..;;/ -% LATIN EXTENDED-B/ - ;;;;;;;/ - ;;;;;;;;/ - ;;;;;;;;/ - ;;;..(2)..;/ - ..(2)..;;;;..(2)..;/ - ..(2)..;..(2)..;/ - ;;..(2)..;/ -% IPA EXTENSIONS/ - ;;;;;;;;;/ - ;;;;;;;;..;/ - ;/ -% COMBINING DIACRITICAL MARKS/ - ;/ -% BASIC GREEK/ - ;;;/ - ..;/ - ..;..;/ -% GREEK SYMBOLS AND COPTIC/ - ;;;;..(2)..;..;/ - ;;;/ -% CYRILLIC/ - ..;..(2)..;/ - ;..(2)..;..(2)..;/ - ;/ - ..(2)..;/ -% ARMENIAN/ - ..;/ -% PHONETIC EXTENSIONS/ - ;/ -% LATIN EXTENDED ADDITIONAL/ - ..(2)..;..;;..(2)..;/ -% GREEK EXTENDED/ - ..;..;..;..;/ - ..;..(2)..;..;..;/ - ..;..;..;;;/ - ;;;;;;;;/ - ;/ -% LETTERLIKE SYMBOLS/ - ;/ -% NUMBER FORMS/ - ..;;/ -% ENCLOSED ALPHANUMERICS/ - ..;/ -% GLAGOLITIC/ - ..;/ -% LATIN EXTENDED-C/ - ;;..(2)..;;;;/ - ..;/ -% COPTIC/ - ..(2)..;/ -% GEORGIAN SUPPLEMENT/ -% well, there are three georgian blocks defined; one caseless (the one usually/ -% used), one defined as uppercase and one as lowercase. defining the lowercase one here/ - ..;/ -% CYRILLIC SUPPLEMENT 2/ - ..(2)..;..(2)..;..(2)..;/ -% LATIN EXTENDED-D/ - ..(2)..;;..(2)..;..;/ - ..(2)..;..(2)..;;/ -% HALFWIDTH AND FULLWIDTH FORMS/ - ..;/ -% DESERET/ - .. - -% The "alpha" class of the "i18n" FDCC-set is reflecting -% the recommendations in TR 10176 annex A -alpha / -% BASIC LATIN/ - ..;..;/ -% LATIN-1 SUPPLEMENT/ - ;;;..;..;/ - ..;/ -% LATIN EXTENDED-A/ - ..;/ -% LATIN EXTENDED-B/ - ..;/ -% IPA EXTENSIONS/ - ..;/ -% SPACING MODIFIER LETTERS/ - ..;..;..;/ - ;/ -% COMBINING DIACRITICAL MARKS/ - ;/ -% BASIC GREEK/ - ..;..;..;;/ - ..;;..;/ - ..;/ -% GREEK SYMBOLS AND COPTIC/ - ..;..;/ -% CYRILLIC/ - ..;..;/ -% CYRILLIC SUPPLEMENT/ - ..;/ -% ARMENIAN/ - ..;;..;/ -% HEBREW/ - ..;..;/ -% ARABIC/ - ..;..;..;/ - ;..;..;..;;/ -% SYRIAC/ - ;..;..;/ -% ARABIC SUPPLEMENT/ - ..;/ -% THAANA/ - ..;;/ -% NKO/ - ..;..;;/ -% - All Matras of Indic and Sinhala are moved from punct to alpha class/ -% - Added Unicode 5.1 charctares of Indic scripts/ -% DEVANAGARI/ - ..;..;/ - ..;..;/ - ;;;..;/ -% TABLE 18 BENGALI/ - ..;..;;;..;/ - ..;;..;..;/ - ;;..;;/ - ;;..;..;/ -% GURMUKHI/ - ..;..;;;..;/ - ..;;;;;;;/ - ;..;;;..;;/ - ..;;..;/ -% GUJARATI/ - ..;/ - ..;..;..;/ - ..;;;..;..;/ - ..;..;/ - ;..;;/ -% ORIYA/ - ..;..;;;..;/ - ..;;;..;..;/ - ..;..;..;;;/ - ..;;;/ -% TAMIL/ - ;;..;..;..;;/ - ;;;;;;..;/ - ..;..;..;..;/ - ;;..;/ -% TELUGU/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ -% KANNADA/ - ..;..;..;..;/ - ..;..;..;..;..;/ - ..;;..;;;/ -% MALAYALAM/ - ..;..;..;..;/ - ..;..;/ - ..;..;;/ - ..;..;/ -% SINHALA/ - ..;..;..;..;;/ - ..;;/ - ..;;..;..;/ -% THAI/ - ..;..;..;..;/ -% LAO/ - ..;;..;;;/ - ..;..;..;;;/ - ..;..;..;;/ - ..;;..;/ -% TIBETAN/ - ;..;..;..;/ -% MYANMAR/ - ..;..;..;;;/ - ;..;..;;/ -% GEORGIAN/ - ..;..;;/ -% HANGUL JAMO/ - ..;..;..;/ -% ETHIOPIC/ - ..;..;/ - ..;;..;..;/ - ..;..;..;/ - ..;;..;..;/ - ..;/ - ..;..;/ -% ETHIOPIC EXTENDED/ - ..;/ -% CHEROKEE/ - ..;/ -% UNIFIED CANADIAN ABORIGINAL SYLLABICS/ - ..;..;/ -% OGHAM/ - ..;/ -% RUNIC/ - ..;..;/ -% TAGALOG/ - ..;..;/ -% HANUNOO/ - ..;/ -% BUHID/ - ..;/ -% TAGBANWA/ - ..;..;/ -% KHMER/ - ..;;;/ -% MONGOLIAN/ - ..;..;;/ -% LIMBU/ - ..;..;/ -% TAI LE/ - ..;..;/ -% NEW TAI LUE/ - ..;..;..;/ -% BUGINESE/ - ..;/ -% BALINESE/ - ..;..;..;/ -% SUNDANESE/ - ..;..;/ -% LEPCHA/ - ..;..;/ -% OL CHIKI/ - ..;/ -% PHONETIC EXTENSIONS/ - ..;/ -% LATIN EXTENDED ADDITIONAL/ - ..;..;/ -% GREEK EXTENDED/ - ..;..;..;..;/ - ..;;;;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;/ -% SUPERSCRIPTS AND SUBSCRIPTS/ - ;;..;/ -% LETTERLIKE SYMBOLS/ - ;;..;;..;;/ - ;..;..;/ - ..;..;;/ -% NUMBER FORMS/ - ..;/ -% ENCLOSED ALPHANUMERICS/ - ..;/ -% GLAGOLITIC/ - ..;..;/ -% LATIN EXTENDED-C/ - ..;..;/ -% COPTIC/ - ..;/ -% GEORGIAN SUPPLEMENT/ - ..;/ -% TIFINAGH/ - ..;;/ -% ETHIOPIC EXTENDED/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;/ -% CJK SYMBOLS AND PUNCTUATION/ - ..;..;..;..;/ -% HIRAGANA/ - ..;..;/ -% KATAKANA/ - ..;..;/ -% BOPOMOFO/ - ..;/ -% HANGUL COMPATIBILITY JAMO/ - ..;/ -% BOPOMOFO EXTENDED/ - ..;/ -% KATAKANA PHONETIC EXTENSIONS/ - ..;/ -% CJK UNIFIED IDEOGRAPHS EXTENSION/ - ..;/ -% CJK UNIFIED IDEOGRAPHS/ - ..;/ -% YI SYLLABLES/ - ..;/ -% VAI SYLLABLES/ - ..;..;..;/ -% CYRILLIC SUPPLEMENT 2/ - ..;..;..;/ -% LATIN EXTENDED-D/ - ..;..;..;/ -% SYLOTI NEGRI/ - ;;..;..;..;/ -% PHAGS PA/ - ..;/ -% SAURASHTRA/ - ..;/ -% KAYAH LI/ - ..;/ -% REJANG/ - ..;/ -% CHAM/ - ..;..;..;/ -% HANGUL SYLLABLES/ - ..;/ -% CJK COMPATIBILITY IDEOGRAPHS/ - ..;..;/ - ..;/ -% ALPHABETIC PRESENTATION FORMS/ - ..;..;;..;/ - ..;..;;;;;/ - ;..;/ -% ARABIC PRESENTATION FORMS-A/ - ..;..;..;..;/ - ..;/ -% ARABIC PRESENTATION FORMS-B/ - ..;..;/ -% HALFWIDTH AND FULLWIDTH FORMS/ - ..;..;..;..;/ - ..;..;..;/ -% LINEAR B SYLLABARY/ - ..;..;/ - ..;..;/ - ..;..;/ -% LINEAR B IDEOGRAMS/ - ..;/ -% ANCIENT GREEK NUMBERS/ - ..;/ -% LYCIAN/ - ..;/ -% CARIAN/ - ..;/ -% OLD ITALIC/ - ..;/ -% GOTHIC/ - ..;/ -% UGARITIC/ - ..;/ -% OLD PERSIAN/ - ..;..;/ - ..;/ -% DESERET/ - ..;/ -% SHAVIAN/ - ..;/ -% OSMANYA/ - ..;..;/ -% CYPRIOT SYLLABARY/ - ..;;..;/ - ..;;;/ -% PHOENICIAN/ - ..;;..;/ -% KHAROSHTI/ - ..;..;/ -% CUNEIFORM/ - ..;/ -% CUNEIFORM NUMBERS AND PONCTUATION/ - ..;/ -% BYZANTINE MUSICAL SYMBOLS/ -% MATHEMATICAL ALPHANUMERIC SYMBOLS/ - ..;..;/ - ..;;..;/ - ..;..;;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ -% CJK UNIFIED IDEOGRAPHS EXTENSION/ - ..;/ -% CJK COMPATIBILITY IDEOGRAPHS SUPPLEMENT/ - ..;/ -% The non-ASCII number characters are included here because ISO C 99 / -% forbids us to classify them as digits; however, they behave more like / -% alphanumeric than like punctuation. / -% ARABIC/ - ..;..;/ -% DEVANAGARI/ - ..;/ -% BENGALI/ - ..;/ -% GURMUKHI/ - ..;/ -% GUJARATI/ - ..;/ -% ORIYA/ - ..;/ -% TAMIL/ - ..;/ -% TELUGU/ - ..;..;/ -% KANNADA/ - ..;/ -% MALAYALAM/ - ..;..;/ -% THAI/ - ..;/ -% LAO/ - ..;/ -% TIBETAN/ - ..;/ -% MYANMAR/ - ..;/ -% KHMER/ - ..;/ -% MONGOLIAN/ - ..;/ -% SUNDANESE/ - ..;/ -% LEPCHA/ - ..;/ -% OL CHIKI/ - ..;/ -% VAI/ - ..;/ -% SAURASHTRA/ - ..;/ -% KAYAH LI/ - ..;/ -% CHAM/ - ..;/ -% HALFWIDTH AND FULLWIDTH FORMS/ - .. - -% The "digit" class must only contain the BASIC LATIN digits, says ISO C 99 -% (sections 7.25.2.1.5 and 5.2.1). +alpha \ + ..;..;;;;/ + ..;..;..;;/ + ..;..;..;;/ + ..;..;..;..;/ + ;;;..;;..;/ + ;..;;;..;/ + ;..;..;..;/ + ..;..;;..;/ + ..;;..;..;/ + ;..;..;..;/ + ..;;..;..;/ + ..;..;;..;/ + ;..;..;..;/ + ..;;..;..;/ + ;;;..;..;/ + ..;..;;..;/ + ..;;..;..;/ + ;..;;..;;/ + ..;..;..;..;/ + ..;;..;;;/ + ;..;..;..;/ + ..;;..;..;/ + ..;;..;;..;/ + ..;..;..;..;/ + ;..;;..;..;/ + ..;..;;;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;;..;..;/ + ;..;;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ;..;;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ;;;;..;..;/ + ..;;;..;..;/ + ..;;;;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;;;;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ;;;..;;..;/ + ..;;..;;..;/ + ..;..;;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ;;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ;..;..;..;/ + ;..;..;..;/ + ;;..;;..;/ + ;;..;..;..;/ + ;;..;..;;/ + ..;..;..;;/ + ..;;;..;;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;..;/ + ;..;..;..;/ + ..;..;;;..;/ + ..;..;..;..;/ + ;..;..;;;/ + ;..;;;..;/ + ;..;..;..;/ + ;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ;..;;;..;/ + ;..;..;;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ;;;..;;;/ + ..;..;..;..;/ + ;..;;..;;/ + ..;;;..;;/ + ;..;..;;..;/ + ;..;..;..;/ + ..;..;..;;/ + ..;..;;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ;;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ;;..;;;..;/ + ;..;;;;..;/ + ..;..;;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ;;;..;..;/ + ..;;;..;..;/ + ;..;..;;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;;/ + ..;..;..;;/ + ..;;..;..;/ + ;..;..;..;/ + ..;;..;;..;/ + ..;..;;..;/ + ;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;;..;/ + ..;;..;..;/ + ..;..;;..;/ + ;..;;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;;..;;/ + ..;;..;;;/ + ..;..;..;..;/ + ;;;..;;..;/ + ;..;..;;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;;;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;;;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;..;/ + ..;;..;/ + ;..;..;/ + ..;;..;/ + ;..;..;/ + ..;..;..;/ + ;;..;;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ;..;;..;/ + ..;..;;/ + ..;..;..;/ + ..;..;;/ + ;..;..;/ + ;..;;..;/ + ..;..;..;/ + ..;;..;/ + ..;..;..;/ + ;;;;..;/ + ;;;..;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ;..;..;/ + ..;..;..;/ + ..;..;;/ + ..;..;..;/ + ;..;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;;..;/ + ..;;;;;/ + ;;..;..;/ + ;;;;;;..;/ + ;..;..;/ + ..;..;;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + +lower \ + ..;;;;..;/ + ..;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;..;;;;;/ + ;;;..;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;;;;/ + ..;;;..;;/ + ;;;;..;;/ + ;;;..;..;/ + ;;;;;;;/ + ;;;..;;;/ + ;;;;;;..;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;..;;..;/ + ;;;;;..;/ + ..;..;..;..;/ + ;;;;;..;/ + ;..;..;..;/ + ;;;;;;;/ + ;;;;..;;/ + ;..;..;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;..;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;..;/ + ..;..;..;;/ + ..;..;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;..;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;;;..;/ + ;..;;;;;/ + ..;..;;..;/ + ;..;..;;..;/ + ;;;;..;..;/ + ..;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;;;;/ + ..;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;..;/ + ;;;;;;..;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;..;;/ + ;;;;;;;/ + ;;..;;;;/ + ;;;;;;;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;;/ + +upper \ + ..;..;..;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;;;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ;;..;;;..;/ + ..;;..;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ..;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;..;..;/ + ;..;;;;;/ + ;;;;;..;/ + ;..;..;..;/ + ;..;;;;;/ + ;;;;;;;/ + ;;;..;..;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;..;..;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;..;/ + ..;..;..;..;/ + ;;;;..;..;/ + ..;..;..;..;/ + ;;..;..;;/ + ..;;;;..;/ + ..;..;;..;/ + ;..;..;;..;/ + ;;;..;;;/ + ..;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;;..;/ + ;;;;;;;/ + ;;;;;;;/ + ;;;;..;..;/ + ..;..;..;/ + ..;..;..;/ + ;..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;..;/ + ..;..;;/ + ..;..;..;/ + digit / .. - % The "outdigit" information is by default "0" to "9". We don't have to % provide it here since localedef will fill in the bits and it would % prevent locales copy-ing this file define their own values. -% outdigit .. - -space / -% ISO/IEC 6429/ - ..;/ -% BASIC LATIN/ - ;/ -% OGHAM/ - ;/ -% MONGOL/ - ;/ -% GENERAL PUNCTUATION/ - ..;..;;;;/ -% CJK SYMBOLS AND PUNCTUATION, HIRAGANA/ +%outdigit / +% .. +blank / + ;;;..;..;;/ - +space / + ..;;;..;..;/ + ..;; cntrl / - ..;..;/ -% Treat the Line/Paragraph Separators as control characters, like Line Feed./ - ; - + ..;..;.. punct / ..;..;..;..;/ ..;..;..;..;/ - ;;..;..;..;/ - ..;..;..;;/ - ..;;;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;;;..;/ - ..;..;..;;;/ - ..;..;..;..;/ - ;;/ - ;/ - ;;;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;;/ - ;..;..;/ + ;;..;..;..;/ + ;..;..;;;/ + ..;;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;;..;..;..;/ + ..;;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;;..;;/ + ..;..;..;;/ + ..;..;..;;/ + ..;..;..;;/ + ..;;..;;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;;/ + ..;;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;;/ + ..;;..;;..;/ + ..;;;;;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;..;;/ ..;..;..;..;/ ..;..;..;..;/ - ..;;..;..;;/ + ..;;..;..;;/ ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;/ - ..;..;;..;/ - ..;..;..;..;/ - ;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;;;;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;/ - ..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;;;;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;;..;..;/ ..;..;..;..;/ ..;..;..;..;/ ..;..;;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;;;;..;/ - ..;;;..;..;/ - ..;..;;..;;/ - ..;..;/ - ..;;;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;/ - ..;..;;/ - ;..;;/ - ..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;;;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;;..;;/ + ..;..;..;..;/ + ;..;..;..;;/ + ..;..;..;;/ + ..;..;;;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;;;;/ + ..;..;/ + ..;..;;/ + ;..;..;/ ..;..;/ ..;..;/ - ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ ..;..;/ ..;..;/ ..;;;;;/ ;;;;;;/ - ;..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ ..;.. - +xdigit / + ..;..;.. graph / - ..;..;..;/ - ..;;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ ..;..;;..;/ ..;..;..;;/ - ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ ..;..;..;;/ ..;..;..;;/ - ..;/ - ;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;;/ + ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ - ..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;/ - ..;;..;;..;/ - ;..;..;..;/ - ..;..;;..;;/ - ;..;..;..;;/ - ;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;;;/ - ..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;/ - ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;;..;/ + ..;..;..;..;/ + ..;;..;;;/ + ..;..;..;;;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ ;;;..;..;/ ..;..;..;..;/ ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;/ - ..;..;..;..;/ - ..;..;..;;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ ..;..;/ ..;..;/ - ..;;..;/ - ..;;;/ - ..;;..;/ + ..;..;;/ + ..;..;/ + ..;..;;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ ..;..;/ ..;..;/ ..;..;/ - ..;..;/ - ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ ..;..;/ ..;..;/ ..;..;/ @@ -770,109 +793,128 @@ graph / ..;..;;/ ..;..;/ ..;..;/ - ..;..;/ - ..;..;;/ + ..;..;/ + ..;..;/ + ..;;;/ + ..;..;;/ + ;;;;;/ + ..;..;;/ + ;;;;;/ + ..;;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ ..;..;/ ..;.. - print / - ..;..;..;/ - ..;;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ ..;..;;..;/ ..;..;..;;/ - ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ ..;..;..;;/ ..;..;..;;/ - ..;/ - ;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;;/ + ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ - ..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;/ - ..;;..;;..;/ - ;..;..;..;/ - ..;..;;..;;/ - ;..;..;..;;/ - ;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;;;/ - ..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;;..;/ + ..;..;..;..;/ + ..;;..;;;/ + ..;..;..;;;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;;..;..;/ - ..;..;..;;/ - ..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;/ - ..;..;..;/ - ..;..;..;..;/ - ;..;..;..;/ - ..;/ - ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;;;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;;/ - ..;..;..;..;/ + ..;..;..;..;/ ..;..;..;..;/ - ..;..;..;..;/ + ..;..;..;..;/ ..;..;;..;/ ..;..;..;..;/ ..;..;..;/ @@ -880,47 +922,222 @@ print / ..;..;/ ..;..;/ ..;..;/ - ..;..;/ - ..;..;/ + ..;..;/ + ..;;..;/ ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ ..;;..;/ - ..;;;/ - ..;;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;;..;/ - ..;..;;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;;/ - ..;..;/ - ..;..;/ - ..;..;/ - ..;..;;/ + ..;;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ + ;..;..;/ + ;;;;;;/ + ..;..;;/ + ;;;;;/ + ..;;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;;/ ..;..;/ ..;.. - -% The "xdigit" class must only contain the BASIC LATIN digits and A-F, a-f, -% says ISO C 99 (sections 7.25.2.1.12 and 6.4.4.1). -xdigit / - ..;..;.. - -blank / - ;;;;..;..;/ - ; - +class "combining"; / + ..;..;..;;/ + ..;..;;..;/ + ..;;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;;..;..;;/ + ..;..;..;;/ + ..;;..;;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;;..;/ + ;..;..;;..;/ + ..;;..;..;/ + ..;..;;;;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;;..;;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;;..;;/ + ;;..;..;..;/ + ..;..;..;..;/ + ..;;..;;..;/ + ..;;..;..;/ + ..;;..;..;/ + ..;..;;..;/ + ..;;;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;.. +class "combining_level3"; / + ..;;..;..;;/ + ..;;..;..;;/ + ;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;;..;..;;/ + ..;..;..;;/ + ..;;..;;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;;..;/ + ;..;..;;..;/ + ..;;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ..;..;..;..;/ + ;..;..;..;/ + ..;..;..;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;..;;;;/ + ..;..;..;..;/ + ..;..;..;;/ + ..;;..;..;/ + ..;..;..;..;/ + ;..;..;/ + ..;;;;;/ + ..;..;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;;/ + ..;..;/ + ..;;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + ..;..;/ + .. toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -971,18 +1188,19 @@ toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -992,47 +1210,49 @@ toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1042,38 +1262,38 @@ toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1122,20 +1342,20 @@ toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1145,13 +1365,37 @@ toupper / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);/ (,);(,);/ (,);(,);/ @@ -1171,8 +1415,23 @@ toupper / (,);(,);/ (,);(,);/ (,);(,);/ - (,);(,) - + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,) tolower / (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1231,7 +1490,7 @@ tolower / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1239,149 +1498,151 @@ tolower / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1394,34 +1655,75 @@ tolower / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,);(,);/ - (,) - + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,) map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1472,15 +1774,19 @@ map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1490,47 +1796,49 @@ map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1540,37 +1848,38 @@ map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1619,19 +1928,20 @@ map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ @@ -1641,13 +1951,37 @@ map "totitle"; / (,);(,);(,);(,);/ (,);(,);(,);(,);/ (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);(,);/ - (,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ + (,);(,);(,);(,);/ (,);(,);/ (,);(,);/ (,);(,);/ @@ -1667,89 +2001,23 @@ map "totitle"; / (,);(,);/ (,);(,);/ (,);(,);/ - (,);(,) - -% The "combining" class reflects ISO/IEC 10646-1 annex B.1 -% That is, all combining characters (level 2+3). -class "combining"; / - ..;..;..;..;/ - ;..;..;;..;/ - ..;;..;..;/ - ..;..;;..;/ - ..;..;..;;/ - ..;..;..;..;/ - ;..;..;..;;/ - ..;..;;..;/ - ..;..;;..;/ - ;..;/ - ;..;..;..;/ - ..;..;;..;/ - ..;..;..;;/ - ..;..;..;;;/ - ..;..;..;..;/ - ..;..;..;;/ - ..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ;..;..;;..;/ - ;..;..;;..;/ - ..;;..;..;/ - ..;..;;;;/ - ..;..;..;..;/ - ..;;..;/ - ..;..;..;..;/ - ..;..;;/ - ;..;..;/ - ..;..;..;;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;;;;;/ - ;..;;..;..;/ - ..;..;/ - ..;..;;/ - ..;..;/ - ..;..;/ - ..;..;/ - .. - -% The "combining_level3" class reflects ISO/IEC 10646-1 annex B.2 -% That is, combining characters of level 3. -class "combining_level3"; / - ..;;..;..;;/ - ..;;..;;;;/ - ..;..;;..;/ - ..;..;;..;/ - ..;..;;..;/ - ..;;..;..;/ - ..;;..;;..;/ - ;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;;..;/ - ..;..;;;..;/ - ..;..;..;..;/ - ..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;..;..;;/ - ..;/ - ..;;..;;..;/ - ..;;..;..;;/ - ..;..;..;..;/ - ..;;..;..;/ - ..;..;..;..;/ - ..;/ - ..;..;;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;..;..;/ - ..;..;;;;/ - ..;;..;..;/ - ..;;;;;/ - ..;.. + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,);/ + (,);(,) translit_start diff --git a/scripts/ctype-compatibility.py b/scripts/ctype-compatibility.py new file mode 100755 index 0000000..553339d --- /dev/null +++ b/scripts/ctype-compatibility.py @@ -0,0 +1,213 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -i*- +# Copyright (C) 2014 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by Pravin Satpute , 2014. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# This script is useful for checking backward compatibility of newly +# generated LC_CTYPE file from gen-unicode-ctype.c and gen-unicode-ctype-dcp.py +# USAGE: python check-backcompatibility.py existing_ctype_file new_ctype_file +# Existing LC_CTYPE file /usr/share/i18n/locale/i18n and new generated 'unicode-ctype' + +import os +import sys + +class ctype: + def __init__(self): + self.upper, self.lower, self.alpha, self.digit, self.space, self.cntrl, self.punct, \ + self.graph, self.printc, self.xdigit, self.blank, self.combining, self.combining3 \ + = [], [], [], [], [], [], [], [], [], [], [], [], [] + +"""Captures Unicode values from character class and add +to ctype struct +""" +def extract_class_and_unichars(filename, struct_ctype): + ipfile = open(filename) + flines = ipfile.readlines() + linecount = len(flines) + i = 0 + for l in flines: + w = l.split() + if len(w) > 1: + if l.split()[0] == "upper": +# print "found uppper", i + process_chars(i+1, struct_ctype.upper, flines) + if l.split()[0] == "lower": + process_chars(i+1, struct_ctype.lower, flines) + if l.split()[0] == "alpha": + process_chars(i+1, struct_ctype.alpha, flines) + if l.split()[0] == "digit": + process_chars(i+1, struct_ctype.digit, flines) + if l.split()[0] == "space": + process_chars(i+1, struct_ctype.space, flines) + if l.split()[0] == "cntrl": + process_chars(i+1, struct_ctype.cntrl, flines) + if l.split()[0] == "punct": + process_chars(i+1, struct_ctype.punct, flines) + if l.split()[0] == "graph": + process_chars(i+1, struct_ctype.graph, flines) + if l.split()[0] == "print": + process_chars(i+1, struct_ctype.printc, flines) + if l.split()[0] == "xdigit": + process_chars(i+1, struct_ctype.xdigit, flines) + if l.split()[0] == "blank": + process_chars(i+1, struct_ctype.blank, flines) + if l.split()[1] == "\"combining\";": +# print "combining" + process_chars(i+1, struct_ctype.combining, flines) + if l.split()[1] == "\"combining_level3\";": +# print "combining_level3" + process_chars(i+1, struct_ctype.combining3, flines) + + i = i+1 +# print "alpha chars group", struct_ctype.alpha + + +"""Breaks each line of i18n and unicode file into Unicode blocks +Separated by ";" and extract Unicode values and add into Struct +""" +def process_chars(line_no, list_name, flines): + for x in range(line_no, len(flines)): +# print x + if len(flines[x].split()) < 1: + break + if flines[x].split()[0] == "%": + continue + + else: +# Break line into Unicode value range + l = flines[x].strip().split(";") + if l[len(l)-1] != "/": + list_lenght = len(l)+1 + else: + list_lenght = len(l) + for i in range (0, list_lenght-1): + individual_word = l[i].split("..") +# print individual_word +# For blocks of characters in ".." + if len(individual_word ) == 1: +# print individual_word[0] + uni_char = individual_word[0][2:len(individual_word[0])-1] + hex_uni_char = hex(int(uni_char,16)) + list_name.append(hex_uni_char) +# For blocks of characters in ".." + if len(individual_word ) == 2: +# print individual_word + uni_char1 = individual_word[0][2:len(individual_word[0])-1] + uni_char2 = individual_word[1][2:len(individual_word[0])-1] +# print int(uni_char1,16), hex(int(uni_char1,16)) + count = 0 + for i in range (int(uni_char1,16), int(uni_char2,16)+1): + list_name.append(hex(int(uni_char1,16)+count)) + count = count + 1 +# For blocks of characters in "..(2).." + if len(individual_word ) == 3: +# print individual_word + uni_char1 = individual_word[0][2:len(individual_word[0])-1] + uni_char2 = individual_word[2][2:len(individual_word[0])-1] +# print int(uni_char1,16), hex(int(uni_char1,16)) +# print int(uni_char2,16), hex(int(uni_char2,16)) + count = 0 + for i in range (int(uni_char1,16), int(uni_char2,16)+1,2): + list_name.append(hex(int(uni_char1,16)+count)) + count = count + 2 +# This condition specifically added for file generated by gen-unicode-ctype.c +# it does not break char group by line + l = flines[x].strip().split(";") + if l[len(l)-1] != "/": + break + +# Compared values added in stuct +def compare_list(old_list, new_list): + for property, value in vars(old_list).iteritems(): + exec("prop = %s %s" % ("new_list.",property)) + print "%s: %d chars in old ctype and %d chars in new ctype" % (property, len(value), len(prop)) + report(value, prop) + +# Report values to stdout +def report(old_list, new_list): + missing_chars = list(set(old_list)-set(old_list).intersection(set(new_list))) + print "Missing %d characters of old ctype in new ctype \n " % len(missing_chars), sorted(missing_chars) + print "\n****************************************************" + + +# This function compares TOLOWER, TOUPPER and TOTITLE pairs of i18n and unicode file +def check_pairs(file_old, file_new): + ipfile = open(file_old) + flines = ipfile.readlines() + linecount = len(flines) + i = 0 + for l in flines: + w = l.split() + if len(w) > 1: + if l.split()[0] == "toupper": + pair_name = "toupper" + print "Processing for TOUPPER pair group" + process_pairs(i+1, flines, file_new, pair_name) + print "Completed processing for TOUPPER pair group" + if l.split()[0] == "tolower": + pair_name = "tolower" + print "Processing for TOLOWER pair group" + process_pairs(i+1, flines, file_new, pair_name) + print "Completed processing for TOLOWER pair group" + if l.split()[1] == "\"totitle\";": + pair_name = "totitle" + print "Processing for TOTITLE pair group" + process_pairs(i+1, flines, file_new, pair_name) + print "Completed processing for TOTITLE pair group" + i = i + 1 + + +""" Split the i18n file line into Unicode pairs and check into +unicode files +""" +def process_pairs(line_no, flines, file_new, pair_name): + f = open(file_new).read() + for x in range(line_no, len(flines)): + if len(flines[x].split()) < 1: + break + if flines[x].split()[0] == "%": + continue + + else: +# Break line into pairs, separated by ; + l = flines[x].strip().split(";") + if l[len(l)-1] != "/": + list_lenght = len(l)+1 + else: + list_lenght = len(l) + for i in range (0, list_lenght-1): + if l[i] not in f: + print "%s not present in %s pair new ctype" % (l[i], pair_name) +# Groups are not separated by line in unicode file + l = flines[x].strip().split(";") + if l[len(l)-1] != "/": + break + + +if __name__ == "__main__": + if len(sys.argv) < 3: + print "USAGE: python check_backcompatibility existing_ctype_file new_ctype_file " + else: + file_i18n = sys.argv[1] + file_unicode = sys.argv[2] + ext_ctype = ctype() + new_ctype = ctype() + extract_class_and_unichars(file_i18n, ext_ctype) + extract_class_and_unichars(file_unicode, new_ctype) + compare_list(ext_ctype, new_ctype) + check_pairs(file_i18n, file_unicode) diff --git a/scripts/ctype-gen.sh b/scripts/ctype-gen.sh new file mode 100755 index 0000000..99d9ba8 --- /dev/null +++ b/scripts/ctype-gen.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Script to generate new ctype using gen-unicode-ctype.c and +# gen-unicode-ctype-dcp.py +# Copyright (C) 2014 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by Pravin Satpute , 2014. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +if [ $# -eq 0 ]; then + echo "USAGE: ./ctype-gen.sh UnicodeData.txt DerivedCoreProperties.txt VERSION" + exit 1 +fi +gcc -o gen-unicode-ctype.out gen-unicode-ctype.c +./gen-unicode-ctype.out $1 $3 +python gen-unicode-ctype-dcp.py $2 +rm -rf unicode diff --git a/scripts/gen-unicode-ctype-dcp.py b/scripts/gen-unicode-ctype-dcp.py new file mode 100755 index 0000000..eb1f2e1 --- /dev/null +++ b/scripts/gen-unicode-ctype-dcp.py @@ -0,0 +1,98 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -i*- +# Copyright (C) 2014 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by Pravin Satpute , 2014. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# This script generates alpha, upper and lower ctype from +# DerivedCoreProperties.txt file of UCD and add it to "unicode" file generated +# by gen-unicode-ctype.c +# USAGE: python gen-unicode-ctype-dcp.py DerivedCoreProperties.txt + +import os +import sys + +def process_dcp(dcp_file, outfile): + ipfile = open(dcp_file) + flines = ipfile.readlines() + linecount = len(flines) + i = 0 + for l in flines: + w = l.split() + if len(w) > 3: + if (l.split()[3] == "Uppercase") and (l.split()[2] == "Property:"): +# print "uppercase @ ", i + outfile.write("upper \\\n") + write_class(i+3, outfile, flines) + + if (l.split()[3] == "Lowercase") and (l.split()[2] == "Property:"): +# print "lowercase @ ", i + outfile.write("lower \\\n") + write_class(i+3, outfile, flines) + + if (l.split()[3] == "Alphabetic") and (l.split()[2] == "Property:"): +# print "alphabetic @ ", i + outfile.write("alpha \\\n") + write_class(i+3, outfile, flines) + i = i+1 + ipfile.close() + +def write_class(line_no, outfile, flines): + nline_count = 0 + outfile.write(" ") + for x in range(line_no, len(flines)): +# next time counter to write "\n" to file + if nline_count > 6: + outfile.write("/\n ") + nline_count = 0 + if len(flines[x].split()) < 1: + continue + if flines[x].split()[1] == "Total": +# print x + break + if len(flines[x].split()[0].split(".."))==1: +# print flines[x].split()[0].split("..") + outfile.write( ";") + nline_count = nline_count + 1 + else: +# print flines[x].split()[0].split("..") + outfile.write( "..;") + if len(flines[x].split()[0].split("..")[0]) > 4: + nline_count = nline_count + 3 + else: + nline_count = nline_count + 2 + outfile.write("\n") + +if __name__ == "__main__": + if len(sys.argv) < 2: + print "USAGE: python gen-unicode-ctype-dcp.py DerivedCoreProperties.txt" + else: + dcp_file = sys.argv[1] + outfile=open("unicode-ctype","w") + unicode_file=open("unicode") + flines = unicode_file.readlines() + i = 0 + for l in flines: + outfile.write(l) + i = i+1 + if l == "LC_CTYPE\n": + break + process_dcp(dcp_file, outfile) + for x in range(i,len(flines)): + outfile.write(flines[x]) + outfile.close() + unicode_file.close() diff --git a/scripts/gen-unicode-ctype.c b/scripts/gen-unicode-ctype.c new file mode 100644 index 0000000..6dfb95f --- /dev/null +++ b/scripts/gen-unicode-ctype.c @@ -0,0 +1,791 @@ +/* Generate a Unicode conforming LC_CTYPE category from a UnicodeData file. + Copyright (C) 2000-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Bruno Haible , 2000. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* Usage example: + $ gen-unicode /usr/local/share/Unidata/UnicodeData.txt 3.1 + */ + +#include +#include +#include +#include +#include + +/* This structure represents one line in the UnicodeData.txt file. */ +struct unicode_attribute +{ + const char *name; /* Character name */ + const char *category; /* General category */ + const char *combining; /* Canonical combining classes */ + const char *bidi; /* Bidirectional category */ + const char *decomposition; /* Character decomposition mapping */ + const char *decdigit; /* Decimal digit value */ + const char *digit; /* Digit value */ + const char *numeric; /* Numeric value */ + int mirrored; /* mirrored */ + const char *oldname; /* Old Unicode 1.0 name */ + const char *comment; /* Comment */ + unsigned int upper; /* Uppercase mapping */ + unsigned int lower; /* Lowercase mapping */ + unsigned int title; /* Titlecase mapping */ +}; + +/* Missing fields are represented with "" for strings, and NONE for + characters. */ +#define NONE (~(unsigned int)0) + +/* The entire contents of the UnicodeData.txt file. */ +struct unicode_attribute unicode_attributes [0x110000]; + +/* Stores in unicode_attributes[i] the values from the given fields. */ +static void +fill_attribute (unsigned int i, + const char *field1, const char *field2, + const char *field3, const char *field4, + const char *field5, const char *field6, + const char *field7, const char *field8, + const char *field9, const char *field10, + const char *field11, const char *field12, + const char *field13, const char *field14) +{ + struct unicode_attribute * uni; + + if (i >= 0x110000) + { + fprintf (stderr, "index too large\n"); + exit (1); + } + if (strcmp (field2, "Cs") == 0) + /* Surrogates are UTF-16 artefacts, not real characters. Ignore them. */ + return; + uni = &unicode_attributes[i]; + /* Copy the strings. */ + uni->name = strdup (field1); + uni->category = (field2[0] == '\0' ? "" : strdup (field2)); + uni->combining = (field3[0] == '\0' ? "" : strdup (field3)); + uni->bidi = (field4[0] == '\0' ? "" : strdup (field4)); + uni->decomposition = (field5[0] == '\0' ? "" : strdup (field5)); + uni->decdigit = (field6[0] == '\0' ? "" : strdup (field6)); + uni->digit = (field7[0] == '\0' ? "" : strdup (field7)); + uni->numeric = (field8[0] == '\0' ? "" : strdup (field8)); + uni->mirrored = (field9[0] == 'Y'); + uni->oldname = (field10[0] == '\0' ? "" : strdup (field10)); + uni->comment = (field11[0] == '\0' ? "" : strdup (field11)); + uni->upper = (field12[0] =='\0' ? NONE : strtoul (field12, NULL, 16)); + uni->lower = (field13[0] =='\0' ? NONE : strtoul (field13, NULL, 16)); + uni->title = (field14[0] =='\0' ? NONE : strtoul (field14, NULL, 16)); +} + +/* Maximum length of a field in the UnicodeData.txt file. */ +#define FIELDLEN 120 + +/* Reads the next field from STREAM. The buffer BUFFER has size FIELDLEN. + Reads up to (but excluding) DELIM. + Returns 1 when a field was successfully read, otherwise 0. */ +static int +getfield (FILE *stream, char *buffer, int delim) +{ + int count = 0; + int c; + + for (; (c = getc (stream)), (c != EOF && c != delim); ) + { + /* The original unicode.org UnicodeData.txt file happens to have + CR/LF line terminators. Silently convert to LF. */ + if (c == '\r') + continue; + + /* Put c into the buffer. */ + if (++count >= FIELDLEN - 1) + { + fprintf (stderr, "field too long\n"); + exit (1); + } + *buffer++ = c; + } + + if (c == EOF) + return 0; + + *buffer = '\0'; + return 1; +} + +/* Stores in unicode_attributes[] the entire contents of the UnicodeData.txt + file. */ +static void +fill_attributes (const char *unicodedata_filename) +{ + unsigned int i, j; + FILE *stream; + char field0[FIELDLEN]; + char field1[FIELDLEN]; + char field2[FIELDLEN]; + char field3[FIELDLEN]; + char field4[FIELDLEN]; + char field5[FIELDLEN]; + char field6[FIELDLEN]; + char field7[FIELDLEN]; + char field8[FIELDLEN]; + char field9[FIELDLEN]; + char field10[FIELDLEN]; + char field11[FIELDLEN]; + char field12[FIELDLEN]; + char field13[FIELDLEN]; + char field14[FIELDLEN]; + int lineno = 0; + + for (i = 0; i < 0x110000; i++) + unicode_attributes[i].name = NULL; + + stream = fopen (unicodedata_filename, "r"); + if (stream == NULL) + { + fprintf (stderr, "error during fopen of '%s'\n", unicodedata_filename); + exit (1); + } + + for (;;) + { + int n; + + lineno++; + n = getfield (stream, field0, ';'); + n += getfield (stream, field1, ';'); + n += getfield (stream, field2, ';'); + n += getfield (stream, field3, ';'); + n += getfield (stream, field4, ';'); + n += getfield (stream, field5, ';'); + n += getfield (stream, field6, ';'); + n += getfield (stream, field7, ';'); + n += getfield (stream, field8, ';'); + n += getfield (stream, field9, ';'); + n += getfield (stream, field10, ';'); + n += getfield (stream, field11, ';'); + n += getfield (stream, field12, ';'); + n += getfield (stream, field13, ';'); + n += getfield (stream, field14, '\n'); + if (n == 0) + break; + if (n != 15) + { + fprintf (stderr, "short line in'%s':%d\n", + unicodedata_filename, lineno); + exit (1); + } + i = strtoul (field0, NULL, 16); + if (field1[0] == '<' + && strlen (field1) >= 9 + && !strcmp (field1 + strlen(field1) - 8, ", First>")) + { + /* Deal with a range. */ + lineno++; + n = getfield (stream, field0, ';'); + n += getfield (stream, field1, ';'); + n += getfield (stream, field2, ';'); + n += getfield (stream, field3, ';'); + n += getfield (stream, field4, ';'); + n += getfield (stream, field5, ';'); + n += getfield (stream, field6, ';'); + n += getfield (stream, field7, ';'); + n += getfield (stream, field8, ';'); + n += getfield (stream, field9, ';'); + n += getfield (stream, field10, ';'); + n += getfield (stream, field11, ';'); + n += getfield (stream, field12, ';'); + n += getfield (stream, field13, ';'); + n += getfield (stream, field14, '\n'); + if (n != 15) + { + fprintf (stderr, "missing end range in '%s':%d\n", + unicodedata_filename, lineno); + exit (1); + } + if (!(field1[0] == '<' + && strlen (field1) >= 8 + && !strcmp (field1 + strlen (field1) - 7, ", Last>"))) + { + fprintf (stderr, "missing end range in '%s':%d\n", + unicodedata_filename, lineno); + exit (1); + } + field1[strlen (field1) - 7] = '\0'; + j = strtoul (field0, NULL, 16); + for (; i <= j; i++) + fill_attribute (i, field1+1, field2, field3, field4, field5, + field6, field7, field8, field9, field10, + field11, field12, field13, field14); + } + else + { + /* Single character line */ + fill_attribute (i, field1, field2, field3, field4, field5, + field6, field7, field8, field9, field10, + field11, field12, field13, field14); + } + } + if (ferror (stream) || fclose (stream)) + { + fprintf (stderr, "error reading from '%s'\n", unicodedata_filename); + exit (1); + } +} + +/* Character mappings. */ + +static unsigned int +to_upper (unsigned int ch) +{ + if (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].upper != NONE) + return unicode_attributes[ch].upper; + else + return ch; +} + +static unsigned int +to_lower (unsigned int ch) +{ + if (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].lower != NONE) + return unicode_attributes[ch].lower; + else + return ch; +} + +static unsigned int +to_title (unsigned int ch) +{ + if (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].title != NONE) + return unicode_attributes[ch].title; + else + return ch; +} + +/* Character class properties. */ + +static bool +is_upper (unsigned int ch) +{ + return (to_lower (ch) != ch); +} + +static bool +is_lower (unsigned int ch) +{ + return (to_upper (ch) != ch) + /* is lowercase, but without simple to_upper mapping. */ + || (ch == 0x00DF); +} + +static bool +is_alpha (unsigned int ch) +{ + return (unicode_attributes[ch].name != NULL + && ((unicode_attributes[ch].category[0] == 'L' + /* Theppitak Karoonboonyanan says + , should belong to is_punct. */ + && (ch != 0x0E2F) && (ch != 0x0E46)) + /* Theppitak Karoonboonyanan says + , .., .. are is_alpha. */ + || (ch == 0x0E31) + || (ch >= 0x0E34 && ch <= 0x0E3A) + || (ch >= 0x0E47 && ch <= 0x0E4E) + /* Avoid warning for . */ + || (ch == 0x0345) + /* Avoid warnings for ... */ + || (unicode_attributes[ch].category[0] == 'N' + && unicode_attributes[ch].category[1] == 'l') + /* Avoid warnings for ... */ + || (unicode_attributes[ch].category[0] == 'S' + && unicode_attributes[ch].category[1] == 'o' + && strstr (unicode_attributes[ch].name, " LETTER ") + != NULL) + /* Consider all the non-ASCII digits as alphabetic. + ISO C 99 forbids us to have them in category "digit", + but we want iswalnum to return true on them. */ + || (unicode_attributes[ch].category[0] == 'N' + && unicode_attributes[ch].category[1] == 'd' + && !(ch >= 0x0030 && ch <= 0x0039)))); +} + +static bool +is_digit (unsigned int ch) +{ +#if 0 + return (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'N' + && unicode_attributes[ch].category[1] == 'd'); + /* Note: U+0BE7..U+0BEF and U+1369..U+1371 are digit systems without + a zero. Must add <0> in front of them by hand. */ +#else + /* SUSV2 gives us some freedom for the "digit" category, but ISO C 99 + takes it away: + 7.25.2.1.5: + The iswdigit function tests for any wide character that corresponds + to a decimal-digit character (as defined in 5.2.1). + 5.2.1: + the 10 decimal digits 0 1 2 3 4 5 6 7 8 9 + */ + return (ch >= 0x0030 && ch <= 0x0039); +#endif +} + +static bool +is_outdigit (unsigned int ch) +{ + return (ch >= 0x0030 && ch <= 0x0039); +} + +static bool +is_blank (unsigned int ch) +{ + return (ch == 0x0009 /* '\t' */ + /* Category Zs without mention of "" */ + || (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'Z' + && unicode_attributes[ch].category[1] == 's' + && !strstr (unicode_attributes[ch].decomposition, ""))); +} + +static bool +is_space (unsigned int ch) +{ + /* Don't make U+00A0 a space. Non-breaking space means that all programs + should treat it like a punctuation character, not like a space. */ + return (ch == 0x0020 /* ' ' */ + || ch == 0x000C /* '\f' */ + || ch == 0x000A /* '\n' */ + || ch == 0x000D /* '\r' */ + || ch == 0x0009 /* '\t' */ + || ch == 0x000B /* '\v' */ + /* Categories Zl, Zp, and Zs without mention of "" */ + || (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'Z' + && (unicode_attributes[ch].category[1] == 'l' + || unicode_attributes[ch].category[1] == 'p' + || (unicode_attributes[ch].category[1] == 's' + && !strstr (unicode_attributes[ch].decomposition, + ""))))); +} + +static bool +is_cntrl (unsigned int ch) +{ + return (unicode_attributes[ch].name != NULL + && (!strcmp (unicode_attributes[ch].name, "") + /* Categories Zl and Zp */ + || (unicode_attributes[ch].category[0] == 'Z' + && (unicode_attributes[ch].category[1] == 'l' + || unicode_attributes[ch].category[1] == 'p')))); +} + +static bool +is_xdigit (unsigned int ch) +{ +#if 0 + return is_digit (ch) + || (ch >= 0x0041 && ch <= 0x0046) + || (ch >= 0x0061 && ch <= 0x0066); +#else + /* SUSV2 gives us some freedom for the "xdigit" category, but ISO C 99 + takes it away: + 7.25.2.1.12: + The iswxdigit function tests for any wide character that corresponds + to a hexadecimal-digit character (as defined in 6.4.4.1). + 6.4.4.1: + hexadecimal-digit: one of 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + */ + return (ch >= 0x0030 && ch <= 0x0039) + || (ch >= 0x0041 && ch <= 0x0046) + || (ch >= 0x0061 && ch <= 0x0066); +#endif +} + +static bool +is_graph (unsigned int ch) +{ + return (unicode_attributes[ch].name != NULL + && strcmp (unicode_attributes[ch].name, "") + && !is_space (ch)); +} + +static bool +is_print (unsigned int ch) +{ + return (unicode_attributes[ch].name != NULL + && strcmp (unicode_attributes[ch].name, "") + /* Categories Zl and Zp */ + && !(unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'Z' + && (unicode_attributes[ch].category[1] == 'l' + || unicode_attributes[ch].category[1] == 'p'))); +} + +static bool +is_punct (unsigned int ch) +{ +#if 0 + return (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'P'); +#else + /* The traditional POSIX definition of punctuation is every graphic, + non-alphanumeric character. */ + return (is_graph (ch) && !is_alpha (ch) && !is_digit (ch)); +#endif +} + +static bool +is_combining (unsigned int ch) +{ + /* Up to Unicode 3.0.1 we took the Combining property from the PropList.txt + file. In 3.0.1 it was identical to the union of the general categories + "Mn", "Mc", "Me". In Unicode 3.1 this property has been dropped from the + PropList.txt file, so we take the latter definition. */ + return (unicode_attributes[ch].name != NULL + && unicode_attributes[ch].category[0] == 'M' + && (unicode_attributes[ch].category[1] == 'n' + || unicode_attributes[ch].category[1] == 'c' + || unicode_attributes[ch].category[1] == 'e')); +} + +static bool +is_combining_level3 (unsigned int ch) +{ + return is_combining (ch) + && !(unicode_attributes[ch].combining[0] != '\0' + && unicode_attributes[ch].combining[0] != '0' + && strtoul (unicode_attributes[ch].combining, NULL, 10) >= 200); +} + +/* Return the UCS symbol string for a Unicode character. */ +static const char * +ucs_symbol (unsigned int i) +{ + static char buf[11+1]; + + sprintf (buf, (i < 0x10000 ? "" : ""), i); + return buf; +} + +/* Return the UCS symbol range string for a Unicode characters interval. */ +static const char * +ucs_symbol_range (unsigned int low, unsigned int high) +{ + static char buf[24+1]; + + strcpy (buf, ucs_symbol (low)); + strcat (buf, ".."); + strcat (buf, ucs_symbol (high)); + return buf; +} + +/* Output a character class (= property) table. */ + +static void +output_charclass (FILE *stream, const char *classname, + bool (*func) (unsigned int)) +{ + char table[0x110000]; + unsigned int i; + bool need_semicolon; + const int max_column = 75; + int column; + + for (i = 0; i < 0x110000; i++) + table[i] = (int) func (i); + + fprintf (stream, "%s ", classname); + need_semicolon = false; + column = 1000; + for (i = 0; i < 0x110000; ) + { + if (!table[i]) + i++; + else + { + unsigned int low, high; + char buf[25]; + + low = i; + do + i++; + while (i < 0x110000 && table[i]); + high = i - 1; + + if (low == high) + strcpy (buf, ucs_symbol (low)); + else + strcpy (buf, ucs_symbol_range (low, high)); + + if (need_semicolon) + { + fprintf (stream, ";"); + column++; + } + + if (column + strlen (buf) > max_column) + { + fprintf (stream, "/\n "); + column = 3; + } + + fprintf (stream, "%s", buf); + column += strlen (buf); + need_semicolon = true; + } + } + fprintf (stream, "\n"); +} + +/* Output a character mapping table. */ + +static void +output_charmap (FILE *stream, const char *mapname, + unsigned int (*func) (unsigned int)) +{ + char table[0x110000]; + unsigned int i; + bool need_semicolon; + const int max_column = 75; + int column; + + for (i = 0; i < 0x110000; i++) + table[i] = (func (i) != i); + + fprintf (stream, "%s ", mapname); + need_semicolon = false; + column = 1000; + for (i = 0; i < 0x110000; i++) + if (table[i]) + { + char buf[25+1]; + + strcpy (buf, "("); + strcat (buf, ucs_symbol (i)); + strcat (buf, ","); + strcat (buf, ucs_symbol (func (i))); + strcat (buf, ")"); + + if (need_semicolon) + { + fprintf (stream, ";"); + column++; + } + + if (column + strlen (buf) > max_column) + { + fprintf (stream, "/\n "); + column = 3; + } + + fprintf (stream, "%s", buf); + column += strlen (buf); + need_semicolon = true; + } + fprintf (stream, "\n"); +} + +/* Output the width table. */ + +static void +output_widthmap (FILE *stream) +{ +} + +/* Output the tables to the given file. */ + +static void +output_tables (const char *filename, const char *version) +{ + FILE *stream; + unsigned int ch; + + stream = fopen (filename, "w"); + if (stream == NULL) + { + fprintf (stderr, "cannot open '%s' for writing\n", filename); + exit (1); + } + + fprintf (stream, "escape_char /\n"); + fprintf (stream, "comment_char %%\n"); + fprintf (stream, "\n"); + fprintf (stream, "%% Generated automatically by gen-unicode-ctype for Unicode %s.\n", + version); + fprintf (stream, "\n"); + + fprintf (stream, "LC_IDENTIFICATION\n"); + fprintf (stream, "title \"Unicode %s FDCC-set\"\n", version); + fprintf (stream, "source \"UnicodeData.txt, PropList.txt, DerivedCoreProperties.txt\"\n"); + fprintf (stream, "address \"\"\n"); + fprintf (stream, "contact \"\"\n"); + fprintf (stream, "email \"bug-glibc-locales@gnu.org\"\n"); + fprintf (stream, "tel \"\"\n"); + fprintf (stream, "fax \"\"\n"); + fprintf (stream, "language \"\"\n"); + fprintf (stream, "territory \"Earth\"\n"); + fprintf (stream, "revision \"%s\"\n", version); + { + time_t now; + char date[11]; + now = time (NULL); + strftime (date, sizeof (date), "%Y-%m-%d", gmtime (&now)); + fprintf (stream, "date \"%s\"\n", date); + } + fprintf (stream, "category \"unicode:2001\";LC_CTYPE\n"); + fprintf (stream, "END LC_IDENTIFICATION\n"); + fprintf (stream, "\n"); + + /* Verifications. */ + for (ch = 0; ch < 0x110000; ch++) + { + /* toupper restriction: "Only characters specified for the keywords + lower and upper shall be specified. */ + if (to_upper (ch) != ch && !(is_lower (ch) || is_upper (ch))) + fprintf (stderr, + "%s is not upper|lower but toupper(0x%04X) = 0x%04X\n", + ucs_symbol (ch), ch, to_upper (ch)); + + /* tolower restriction: "Only characters specified for the keywords + lower and upper shall be specified. */ + if (to_lower (ch) != ch && !(is_lower (ch) || is_upper (ch))) + fprintf (stderr, + "%s is not upper|lower but tolower(0x%04X) = 0x%04X\n", + ucs_symbol (ch), ch, to_lower (ch)); + + /* alpha restriction: "Characters classified as either upper or lower + shall automatically belong to this class. */ + if ((is_lower (ch) || is_upper (ch)) && !is_alpha (ch)) + fprintf (stderr, "%s is upper|lower but not alpha\n", ucs_symbol (ch)); + + /* alpha restriction: "No character specified for the keywords cntrl, + digit, punct or space shall be specified." */ + if (is_alpha (ch) && is_cntrl (ch)) + fprintf (stderr, "%s is alpha and cntrl\n", ucs_symbol (ch)); + if (is_alpha (ch) && is_digit (ch)) + fprintf (stderr, "%s is alpha and digit\n", ucs_symbol (ch)); + if (is_alpha (ch) && is_punct (ch)) + fprintf (stderr, "%s is alpha and punct\n", ucs_symbol (ch)); + if (is_alpha (ch) && is_space (ch)) + fprintf (stderr, "%s is alpha and space\n", ucs_symbol (ch)); + + /* space restriction: "No character specified for the keywords upper, + lower, alpha, digit, graph or xdigit shall be specified." + upper, lower, alpha already checked above. */ + if (is_space (ch) && is_digit (ch)) + fprintf (stderr, "%s is space and digit\n", ucs_symbol (ch)); + if (is_space (ch) && is_graph (ch)) + fprintf (stderr, "%s is space and graph\n", ucs_symbol (ch)); + if (is_space (ch) && is_xdigit (ch)) + fprintf (stderr, "%s is space and xdigit\n", ucs_symbol (ch)); + + /* cntrl restriction: "No character specified for the keywords upper, + lower, alpha, digit, punct, graph, print or xdigit shall be + specified." upper, lower, alpha already checked above. */ + if (is_cntrl (ch) && is_digit (ch)) + fprintf (stderr, "%s is cntrl and digit\n", ucs_symbol (ch)); + if (is_cntrl (ch) && is_punct (ch)) + fprintf (stderr, "%s is cntrl and punct\n", ucs_symbol (ch)); + if (is_cntrl (ch) && is_graph (ch)) + fprintf (stderr, "%s is cntrl and graph\n", ucs_symbol (ch)); + if (is_cntrl (ch) && is_print (ch)) + fprintf (stderr, "%s is cntrl and print\n", ucs_symbol (ch)); + if (is_cntrl (ch) && is_xdigit (ch)) + fprintf (stderr, "%s is cntrl and xdigit\n", ucs_symbol (ch)); + + /* punct restriction: "No character specified for the keywords upper, + lower, alpha, digit, cntrl, xdigit or as the character shall + be specified." upper, lower, alpha, cntrl already checked above. */ + if (is_punct (ch) && is_digit (ch)) + fprintf (stderr, "%s is punct and digit\n", ucs_symbol (ch)); + if (is_punct (ch) && is_xdigit (ch)) + fprintf (stderr, "%s is punct and xdigit\n", ucs_symbol (ch)); + if (is_punct (ch) && (ch == 0x0020)) + fprintf (stderr, "%s is punct\n", ucs_symbol (ch)); + + /* graph restriction: "No character specified for the keyword cntrl + shall be specified." Already checked above. */ + + /* print restriction: "No character specified for the keyword cntrl + shall be specified." Already checked above. */ + + /* graph - print relation: differ only in the character. + How is this possible if there are more than one space character?! + I think susv2/xbd/locale.html should speak of "space characters", + not "space character". */ + if (is_print (ch) && !(is_graph (ch) || /* ch == 0x0020 */ is_space (ch))) + fprintf (stderr, + "%s is print but not graph|\n", ucs_symbol (ch)); + if (!is_print (ch) && (is_graph (ch) || ch == 0x0020)) + fprintf (stderr, + "%s is graph| but not print\n", ucs_symbol (ch)); + } + + fprintf (stream, "LC_CTYPE\n"); + /* upper, lower and alpha classes are no more required. DerivedCoreProperties.txt + file providing ready to use classification for above classed. We are generating these classes + using gen-unicode-ctype-dcp.py script from DerivedCoreProperties.txt. + */ +// output_charclass (stream, "upper", is_upper); +// output_charclass (stream, "lower", is_lower); +// output_charclass (stream, "alpha", is_alpha); + output_charclass (stream, "digit", is_digit); + /* The "outdigit" information is by default "0" to "9". We don't have to + provide it here since localedef will fill in the bits and it would + prevent locales copy-ing this file define their own values. */ +// output_charclass (stream, "outdigit", is_outdigit); + output_charclass (stream, "blank", is_blank); + output_charclass (stream, "space", is_space); + output_charclass (stream, "cntrl", is_cntrl); + output_charclass (stream, "punct", is_punct); + output_charclass (stream, "xdigit", is_xdigit); + output_charclass (stream, "graph", is_graph); + output_charclass (stream, "print", is_print); + output_charclass (stream, "class \"combining\";", is_combining); + output_charclass (stream, "class \"combining_level3\";", is_combining_level3); + output_charmap (stream, "toupper", to_upper); + output_charmap (stream, "tolower", to_lower); + output_charmap (stream, "map \"totitle\";", to_title); + output_widthmap (stream); + fprintf (stream, "END LC_CTYPE\n"); + + if (ferror (stream) || fclose (stream)) + { + fprintf (stderr, "error writing to '%s'\n", filename); + exit (1); + } +} + +int +main (int argc, char * argv[]) +{ + if (argc != 3) + { + fprintf (stderr, "Usage: %s UnicodeData.txt version\n", argv[0]); + exit (1); + } + + fill_attributes (argv[1]); + + output_tables ("unicode", argv[2]); + + return 0; +} -- 1.9.3