]> git.sur5r.net Git - openldap/blobdiff - libraries/liblunicode/ucdata/ucgendat.c
ITS#8508 - Allow ucgendat.c to recognize title-case characters even if they do not...
[openldap] / libraries / liblunicode / ucdata / ucgendat.c
index 7a3b991c0447b4f3c9bc9ced3acd8affc3817522..da3ca86286d9d3577510a8ea7a33c353c29b4032 100644 (file)
@@ -536,6 +536,13 @@ add_title(ac_uint4 code)
      */
     cases[2] = code;
 
+    /*
+     * If the upper case character is not present, then make it the same as
+     * the title case.
+     */
+    if (cases[0] == 0)
+      cases[0] = code;
+
     if (title_used == title_size) {
         if (title_size == 0)
           title = (_case_t *) malloc(sizeof(_case_t) << 3);
@@ -818,7 +825,7 @@ read_cdata(FILE *in)
 {
     ac_uint4 i, lineno, skip, code, ccl_code;
     short wnum, neg, number[2], compat;
-    char line[512], *s, *e;
+    char line[512], *s, *e, *first_prop;
 
     lineno = skip = 0;
     while (fgets(line, sizeof(line), in)) {
@@ -962,6 +969,8 @@ read_cdata(FILE *in)
               i++;
         }
         for (e = s; *e && *e != ';'; e++) ;
+
+        first_prop = s;
     
         ordered_range_insert(code, s, e - s);
 
@@ -1109,7 +1118,7 @@ read_cdata(FILE *in)
             if (*s == ';')
               s++;
         }
-        if (cases[0] && cases[1])
+        if (!strncmp(first_prop,"Lt",2) && (cases[0] || cases[1]))
           /*
            * Add the upper and lower mappings for a title case character.
            */