From: Ulrich Drepper Date: Thu, 4 Apr 2002 05:08:56 +0000 (+0000) Subject: (charmap_read): If the charmap doesn't define a code_set_name provide one X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=023272c726f6c95294e5af5264c9cd83136d115e;p=thirdparty%2Fglibc.git (charmap_read): If the charmap doesn't define a code_set_name provide one based on the filename. --- diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index b815e5154b7..22624bd39f3 100644 --- a/locale/programs/charmap.c +++ b/locale/programs/charmap.c @@ -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,