/* linebreak.c - line breaking of Unicode strings
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
return (size_t)(-1);
count += outptr - tmpbuf;
}
- /* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
+ /* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
#if defined _LIBICONV_VERSION \
|| !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
{
if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0))
to_utf8 = (iconv_t)(-1);
else
+# endif
+ /* Avoid Solaris 2.9 bug with GB2312, EUC-TW, BIG5, BIG5-HKSCS, GBK,
+ GB18030. */
+# if defined __sun && !defined _LIBICONV_VERSION
+ if ( STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
+ || STREQ (encoding, "BIG5-HKSCS", 'B', 'I', 'G', '5', '-', 'H', 'K', 'S', 'C')
+ || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
+ || STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ to_utf8 = (iconv_t)(-1);
+ else
# endif
to_utf8 = iconv_open (UTF8_NAME, encoding);
if (to_utf8 != (iconv_t)(-1))
if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0))
to_utf8 = (iconv_t)(-1);
else
+# endif
+ /* Avoid Solaris 2.9 bug with GB2312, EUC-TW, BIG5, BIG5-HKSCS, GBK,
+ GB18030. */
+# if defined __sun && !defined _LIBICONV_VERSION
+ if ( STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
+ || STREQ (encoding, "BIG5-HKSCS", 'B', 'I', 'G', '5', '-', 'H', 'K', 'S', 'C')
+ || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
+ || STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ to_utf8 = (iconv_t)(-1);
+ else
# endif
to_utf8 = iconv_open (UTF8_NAME, encoding);
if (to_utf8 != (iconv_t)(-1))
/* Charset handling while reading PO files.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
if (strcmp (po_lex_charset, "EUC-KR") == 0)
po_lex_iconv = (iconv_t)(-1);
else
+# endif
+ /* Avoid Solaris 2.9 bug with GB2312, EUC-TW, BIG5, BIG5-HKSCS,
+ GBK, GB18030. */
+# if defined __sun && !defined _LIBICONV_VERSION
+ if ( strcmp (po_lex_charset, "GB2312") == 0
+ || strcmp (po_lex_charset, "EUC-TW") == 0
+ || strcmp (po_lex_charset, "BIG5") == 0
+ || strcmp (po_lex_charset, "BIG5-HKSCS") == 0
+ || strcmp (po_lex_charset, "GBK") == 0
+ || strcmp (po_lex_charset, "GB18030") == 0)
+ po_lex_iconv = (iconv_t)(-1);
+ else
# endif
po_lex_iconv = iconv_open ("UTF-8", po_lex_charset);
if (po_lex_iconv == (iconv_t)(-1))
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
if (strcmp (canon_charset, "EUC-KR") == 0)
conv = (iconv_t)(-1);
else
+# endif
+ /* Avoid Solaris 2.9 bug with GB2312, EUC-TW, BIG5, BIG5-HKSCS, GBK,
+ GB18030. */
+# if defined __sun && !defined _LIBICONV_VERSION
+ if ( strcmp (po_lex_charset, "GB2312") == 0
+ || strcmp (po_lex_charset, "EUC-TW") == 0
+ || strcmp (po_lex_charset, "BIG5") == 0
+ || strcmp (po_lex_charset, "BIG5-HKSCS") == 0
+ || strcmp (po_lex_charset, "GBK") == 0
+ || strcmp (po_lex_charset, "GB18030") == 0)
+ conv = (iconv_t)(-1);
+ else
# endif
/* Use iconv() to parse multibyte characters. */
conv = iconv_open ("UTF-8", canon_charset);