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,