about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/charmap.c14
-rw-r--r--locale/programs/charmap.h7
-rw-r--r--locale/programs/ld-ctype.c3
3 files changed, 18 insertions, 6 deletions
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 8612d99688..8c9e4e9abb 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998-2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -25,7 +25,6 @@
 #include <errno.h>
 #include <libintl.h>
 #include <limits.h>
-#include <obstack.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,7 +34,6 @@
 #include "linereader.h"
 #include "charmap.h"
 #include "charmap-dir.h"
-#include "repertoire.h"
 
 #include <assert.h>
 
@@ -55,6 +53,9 @@ static void charmap_new_char (struct linereader *lr, struct charmap_t *cm,
 			      const char *to, int decimal_ellipsis, int step);
 
 
+bool enc_not_ascii_compatible;
+
+
 #ifdef NEED_NULL_POINTER
 static const char *null_pointer;
 #endif
@@ -252,9 +253,12 @@ default character map file `%s' not found"), DEFAULT_CHARMAP));
       while (*p++ != '\0');
 
       if (failed)
-	WITH_CUR_LOCALE (fprintf (stderr, _("\
+	{
+	  WITH_CUR_LOCALE (fprintf (stderr, _("\
 character map `%s' is not ASCII compatible, locale not ISO C compliant\n"),
-				  result->code_set_name));
+				    result->code_set_name));
+	  enc_not_ascii_compatible = true;
+	}
     }
 
   return result;
diff --git a/locale/programs/charmap.h b/locale/programs/charmap.h
index f4ca3abe6c..a4a6d3833b 100644
--- a/locale/programs/charmap.h
+++ b/locale/programs/charmap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -21,6 +21,7 @@
 #define _CHARMAP_H
 
 #include <obstack.h>
+#include <stdbool.h>
 
 #include "repertoire.h"
 #include "simple-hash.h"
@@ -64,6 +65,10 @@ struct charseq
 };
 
 
+/* True if the encoding is not ASCII compatible.  */
+extern bool enc_not_ascii_compatible;
+
+
 /* Prototypes for charmap handling functions.  */
 extern struct charmap_t *charmap_read (const char *filename, int verbose,
 				       int be_quiet, int use_default);
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 499868237b..ca2ca1eaca 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -340,6 +340,9 @@ ctype_startup (struct linereader *lr, struct localedef_t *locale,
 	      ctype->map256_collection[1][cnt] = cnt;
 	    }
 
+	  if (enc_not_ascii_compatible)
+	    ctype->to_nonascii = 1;
+
 	  obstack_init (&ctype->mempool);
 	}
       else