Update config.charset and localcharset.c to current gettext version.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Nov 2002 13:53:07 +0000 (13:53 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Nov 2002 13:53:07 +0000 (13:53 +0000)
lib/ChangeLog
lib/config.charset
lib/localcharset.c

index ff138a0d65ce873d6f6e6db2cb837827c92f4855..4d446b0306360f2c9c17adfb38a9d1de342d67be 100644 (file)
@@ -1,3 +1,38 @@
+2002-05-09  Bruno Haible  <bruno@clisp.org>
+
+       * config.charset: Update for newest glibc. Add canonical names
+       ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
+
+2002-05-09  Bruno Haible  <bruno@clisp.org>
+
+       * localcharset.c (get_charset_aliases): Add more Windows specific
+       aliases.
+
+2002-05-08  Owen Taylor  <otaylor@redhat.com>
+
+       * config.charset: A few additions for Solaris.
+
+2001-12-05  Bruno Haible  <bruno@clisp.org>
+
+       * localcharset.c (locale_charset): Don't return an empty string.
+
+2001-10-23  Bruno Haible  <haible@clisp.cons.org>
+
+       * config.charset: msdos in uk_UA uses CP1125.
+
+2001-08-05  Bruno Haible  <haible@clisp.cons.org>
+
+       Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
+       * localcharset.c (locale_charset): Declare as extern "C".
+
+2002-02-15  Bruno Haible  <bruno@clisp.org>
+
+       * config.charset [msdosdjgpp]: For Russian, use CP866.
+
+2002-02-11  Bruno Haible  <bruno@clisp.org>
+
+       * config.charset: Add support for NetBSD.
+
 2002-09-25    <karl@gnu.org>
 
        * strdup.c: copy from libc/string (via ../config/srclist*).
index b91e0591b863dcc1448ebf914bf9ddd101f4d59a..4f98b5b0cac8fbe6b4105a5a112a7521ed68d2c1 100755 (executable)
@@ -34,7 +34,7 @@
 #   ASCII, ANSI_X3.4-1968     glibc solaris freebsd
 #   ISO-8859-1                glibc aix hpux irix osf solaris freebsd   yes
 #   ISO-8859-2                glibc aix hpux irix osf solaris freebsd   yes
-#   ISO-8859-3                glibc                                     yes
+#   ISO-8859-3                glibc solaris                             yes
 #   ISO-8859-4                osf solaris freebsd                       yes
 #   ISO-8859-5                glibc aix hpux irix osf solaris freebsd   yes
 #   ISO-8859-6                glibc aix hpux solaris                    yes
 #   ISO-8859-8                glibc aix hpux osf solaris                yes
 #   ISO-8859-9                glibc aix hpux irix osf solaris           yes
 #   ISO-8859-13               glibc
+#   ISO-8859-14               glibc
 #   ISO-8859-15               glibc aix osf solaris freebsd
 #   KOI8-R                    glibc solaris freebsd                     yes
 #   KOI8-U                    glibc freebsd                             yes
+#   KOI8-T                    glibc
 #   CP437                     dos
 #   CP775                     dos
 #   CP850                     aix osf dos
 #   CP865                     dos
 #   CP866                     freebsd dos
 #   CP869                     dos
-#   CP874                     win32 dos
+#   CP874                     woe32 dos
 #   CP922                     aix
-#   CP932                     aix win32 dos
+#   CP932                     aix woe32 dos
 #   CP943                     aix
-#   CP949                     osf win32 dos
-#   CP950                     win32 dos
+#   CP949                     osf woe32 dos
+#   CP950                     woe32 dos
 #   CP1046                    aix
 #   CP1124                    aix
+#   CP1125                    dos
 #   CP1129                    aix
-#   CP1250                    win32
-#   CP1251                    glibc win32
-#   CP1252                    aix win32
-#   CP1253                    win32
-#   CP1254                    win32
-#   CP1255                    win32
-#   CP1256                    win32
-#   CP1257                    win32
+#   CP1250                    woe32
+#   CP1251                    glibc woe32
+#   CP1252                    aix woe32
+#   CP1253                    woe32
+#   CP1254                    woe32
+#   CP1255                    glibc woe32
+#   CP1256                    woe32
+#   CP1257                    woe32
 #   GB2312                    glibc aix hpux irix solaris freebsd       yes
 #   EUC-JP                    glibc aix hpux irix osf solaris freebsd   yes
 #   EUC-KR                    glibc aix hpux irix osf solaris freebsd   yes
 #   EUC-TW                    glibc aix hpux irix osf solaris
 #   BIG5                      glibc aix hpux osf solaris freebsd        yes
-#   BIG5-HKSCS                glibc
-#   GBK                       aix osf win32 dos
-#   GB18030                   glibc
+#   BIG5-HKSCS                glibc solaris
+#   GBK                       glibc aix osf solaris woe32 dos
+#   GB18030                   glibc solaris
 #   SHIFT_JIS                 hpux osf solaris freebsd                  yes
-#   JOHAB                     glibc win32
+#   JOHAB                     glibc solaris woe32
 #   TIS-620                   glibc aix hpux osf solaris
 #   VISCII                    glibc                                     yes
+#   TCVN5712-1                glibc
+#   GEORGIAN-PS               glibc
 #   HP-ROMAN8                 hpux
 #   HP-ARABIC8                hpux
 #   HP-GREEK8                 hpux
@@ -217,6 +222,7 @@ case "$os" in
        echo "646 ASCII"
        echo "ISO8859-1 ISO-8859-1"
        echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-3 ISO-8859-3"
        echo "ISO8859-4 ISO-8859-4"
        echo "ISO8859-5 ISO-8859-5"
        echo "ISO8859-6 ISO-8859-6"
@@ -226,9 +232,13 @@ case "$os" in
        echo "ISO8859-15 ISO-8859-15"
        echo "koi8-r KOI8-R"
        echo "BIG5 BIG5"
+       echo "Big5-HKSCS BIG5-HKSCS"
        echo "gb2312 GB2312"
+       echo "GBK GBK"
+       echo "GB18030 GB18030"
        echo "cns11643 EUC-TW"
        echo "5601 EUC-KR"
+       echo "ko_KR.johap92 JOHAB"
        echo "eucJP EUC-JP"
        echo "PCK SHIFT_JIS"
        echo "TIS620.2533 TIS-620"
@@ -272,6 +282,20 @@ case "$os" in
        echo "ja_JP.Shift_JIS SHIFT_JIS"
        echo "ko_KR.EUC EUC-KR"
        ;;
+    netbsd*)
+       echo "646 ASCII"
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-4 ISO-8859-4"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-15 ISO-8859-15"
+       echo "eucCN GB2312"
+       echo "eucJP EUC-JP"
+       echo "eucKR EUC-KR"
+       echo "eucTW EUC-TW"
+       echo "BIG5 BIG5"
+       echo "SJIS SHIFT_JIS"
+       ;;
     beos*)
        # BeOS has a single locale, and it has UTF-8 encoding.
        echo "* UTF-8"
@@ -286,7 +310,7 @@ case "$os" in
        echo "# country is not the one your DOS machine actually uses, just"
        echo "# correct it in this file, and send a mail to"
        echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
-       echo "# and Bruno Haible <haible@clisp.cons.org>."
+       echo "# and Bruno Haible <bruno@clisp.org>."
        echo "#"
        echo "C ASCII"
        # ISO-8859-1 languages
@@ -396,8 +420,10 @@ case "$os" in
        echo "bg_BG CP866" # not CP855 ??
        echo "mk CP866"    # not CP855 ??
        echo "mk_MK CP866" # not CP855 ??
-       echo "ru KOI8-R"    # not CP866 ??
-       echo "ru_RU KOI8-R" # not CP866 ??
+       echo "ru CP866"
+       echo "ru_RU CP866"
+       echo "uk CP1125"
+       echo "uk_UA CP1125"
        # ISO-8859-6 languages
        echo "ar CP864"
        echo "ar_AE CP864"
index bc5587bf6015ca1a45070736eb9630e2accaa7e4..2b1564e2fd8d00b71cd112d2e26d3da6bd37d560 100644 (file)
@@ -17,7 +17,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    USA.  */
 
-/* Written by Bruno Haible <haible@clisp.cons.org>.  */
+/* Written by Bruno Haible <bruno@clisp.org>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 # define getc getc_unlocked
 #endif
 
+#ifdef __cplusplus
+/* When compiling with "gcc -x c++", produce a function with C linkage.  */
+extern "C" const char * locale_charset (void);
+#endif
+
 /* The following static variable is declared 'volatile' to avoid a
    possible multithread problem in the function get_charset_aliases. If we
    are running in a threaded environment, and if two threads initialize
@@ -201,7 +206,20 @@ get_charset_aliases ()
 
 # if defined WIN32
       cp = "CP936" "\0" "GBK" "\0"
-          "CP1361" "\0" "JOHAB" "\0";
+          "CP1361" "\0" "JOHAB" "\0"
+          "CP20127" "\0" "ASCII" "\0"
+          "CP20866" "\0" "KOI8-R" "\0"
+          "CP21866" "\0" "KOI8-RU" "\0"
+          "CP28591" "\0" "ISO-8859-1" "\0"
+          "CP28592" "\0" "ISO-8859-2" "\0"
+          "CP28593" "\0" "ISO-8859-3" "\0"
+          "CP28594" "\0" "ISO-8859-4" "\0"
+          "CP28595" "\0" "ISO-8859-5" "\0"
+          "CP28596" "\0" "ISO-8859-6" "\0"
+          "CP28597" "\0" "ISO-8859-7" "\0"
+          "CP28598" "\0" "ISO-8859-8" "\0"
+          "CP28599" "\0" "ISO-8859-9" "\0"
+          "CP28605" "\0" "ISO-8859-15" "\0";
 # endif
 #endif
 
@@ -267,7 +285,7 @@ locale_charset ()
 
   static char buf[2 + 10 + 1];
 
-  /* Win32 has a function returning the locale's codepage as a number.  */
+  /* Woe32 has a function returning the locale's codepage as a number.  */
   sprintf (buf, "CP%u", GetACP ());
   codeset = buf;
 
@@ -341,5 +359,11 @@ locale_charset ()
        break;
       }
 
+  /* Don't return an empty string.  GNU libc and GNU libiconv interpret
+     the empty string as denoting "the locale's character encoding",
+     thus GNU libiconv would call this function a second time.  */
+  if (codeset[0] == '\0')
+    codeset = "ASCII";
+
   return codeset;
 }