summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-05-17 12:53:53 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:07:58 +0200
commit870c73fd28faf01834d45e026ce2a79e89fb772a (patch)
tree47bd5362b4b2b12a7032428177729bf789e03786
parentabaaf8ab0c3a00701b37af0af5e7d8da14bef310 (diff)
downloadexternal_gettext-870c73fd28faf01834d45e026ce2a79e89fb772a.zip
external_gettext-870c73fd28faf01834d45e026ce2a79e89fb772a.tar.gz
external_gettext-870c73fd28faf01834d45e026ce2a79e89fb772a.tar.bz2
Update to match newest libcharset.
-rw-r--r--intl/ChangeLog28
-rwxr-xr-xintl/config.charset48
-rw-r--r--intl/localcharset.c30
-rw-r--r--lib/ChangeLog28
-rwxr-xr-xlib/config.charset48
-rw-r--r--lib/localcharset.c30
6 files changed, 170 insertions, 42 deletions
diff --git a/intl/ChangeLog b/intl/ChangeLog
index 8839e5f..719d5b6 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,3 +1,31 @@
+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".
+ (get_charset_aliases): Cast malloc and realloc results to 'char *'.
+
2002-04-30 Bruno Haible <bruno@clisp.org>
* loadmsgcat.c (_nl_init_domain_conv): Don't append //TRANSLIT to
diff --git a/intl/config.charset b/intl/config.charset
index 0a1a68d..4f98b5b 100755
--- a/intl/config.charset
+++ b/intl/config.charset
@@ -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
@@ -42,9 +42,11 @@
# 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
@@ -58,35 +60,38 @@
# 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"
@@ -300,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
@@ -412,6 +422,8 @@ case "$os" in
echo "mk_MK CP866" # not CP855 ??
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"
diff --git a/intl/localcharset.c b/intl/localcharset.c
index bc5587b..2b1564e 100644
--- a/intl/localcharset.c
+++ b/intl/localcharset.c
@@ -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>
@@ -82,6 +82,11 @@
# 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;
}
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 37e9931..f40e1b3 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,31 @@
+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".
+ (get_charset_aliases): Cast malloc and realloc results to 'char *'.
+
2002-05-10 Bruno Haible <bruno@clisp.org>
* gettext.h: On Solaris, include <locale.h>.
diff --git a/lib/config.charset b/lib/config.charset
index 0a1a68d..4f98b5b 100755
--- a/lib/config.charset
+++ b/lib/config.charset
@@ -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
@@ -42,9 +42,11 @@
# 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
@@ -58,35 +60,38 @@
# 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"
@@ -300,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
@@ -412,6 +422,8 @@ case "$os" in
echo "mk_MK CP866" # not CP855 ??
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"
diff --git a/lib/localcharset.c b/lib/localcharset.c
index bc5587b..2b1564e 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -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>
@@ -82,6 +82,11 @@
# 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;
}