]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(charmap_read): If the charmap doesn't define a code_set_name provide one
authorUlrich Drepper <drepper@redhat.com>
Thu, 4 Apr 2002 05:08:56 +0000 (05:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 4 Apr 2002 05:08:56 +0000 (05:08 +0000)
based on the filename.

locale/programs/charmap.c

index b815e5154b77034b666dbbbc87f0bd677a35ee02..22624bd39f38e84391ba2551c8b9fbcab7c781d1 100644 (file)
@@ -198,6 +198,11 @@ character map file `%s' not found"), filename));
 default character map file `%s' not found"), DEFAULT_CHARMAP));
     }
 
+  if (result->code_set_name == NULL)
+    /* The input file does not specify a code set name.  This
+       shouldn't happen but we should cope with it.  */
+    result->code_set_name = basename (filename);
+
   /* Test of ASCII compatibility of locale encoding.
 
      Verify that the encoding to be used in a locale is ASCII compatible,