From 023272c726f6c95294e5af5264c9cd83136d115e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 4 Apr 2002 05:08:56 +0000 Subject: [PATCH] (charmap_read): If the charmap doesn't define a code_set_name provide one based on the filename. --- locale/programs/charmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index b815e5154b..22624bd39f 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,