From 9813858f9f94a58eef876a54cc369f286332a532 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 19 Apr 2002 07:49:16 +0000 Subject: Update. 2002-04-15 Bruno Haible * iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access. (BODY for TO_LOOP): Likewise. * iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1. * iconvdata/tst-table.sh: Add support for encodings which contain precomposed Unicode characters, known to the iconv converter in both directions but not listed in the charmap. * iconvdata/IBM856.irreversible: New file. * iconvdata/IBM922.irreversible: New file. * iconvdata/IBM1132.irreversible: New file. * iconvdata/IBM1133.irreversible: New file. * iconvdata/IBM1160.irreversible: New file. * iconvdata/IBM1161.irreversible: New file. * iconvdata/IBM1163.irreversible: New file. * iconvdata/IBM1164.irreversible: New file. * iconvdata/ARMSCII-8.irreversible: New file. * iconvdata/TCVN5712-1.precomposed: New file. * iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129, IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164, ARMSCII-8, TCVN5712-1. * iconvdata/Makefile (distribute): Add IBM856.irreversible, IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible, IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible, IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed. 2002-04-17 Jakub Jelinek * time/tst-mktime.c: Include . Use %d, not %ld format for EVENING69. Include offsets in TZ environment variable. --- iconvdata/ARMSCII-8.irreversible | 5 +++ iconvdata/IBM1132.irreversible | 1 + iconvdata/IBM1133.irreversible | 1 + iconvdata/IBM1160.irreversible | 4 +++ iconvdata/IBM1161.irreversible | 4 +++ iconvdata/IBM1163.irreversible | 2 ++ iconvdata/IBM1164.irreversible | 2 ++ iconvdata/IBM856.irreversible | 36 +++++++++++++++++++++ iconvdata/IBM922.irreversible | 69 ++++++++++++++++++++++++++++++++++++++++ iconvdata/Makefile | 4 +++ iconvdata/TCVN5712-1.precomposed | 56 ++++++++++++++++++++++++++++++++ iconvdata/armscii-8.c | 8 ++--- iconvdata/tcvn5712-1.c | 2 +- iconvdata/tst-table.sh | 29 +++++++++++------ iconvdata/tst-tables.sh | 31 +++++++++++++++--- 15 files changed, 235 insertions(+), 19 deletions(-) create mode 100644 iconvdata/ARMSCII-8.irreversible create mode 100644 iconvdata/IBM1132.irreversible create mode 100644 iconvdata/IBM1133.irreversible create mode 100644 iconvdata/IBM1160.irreversible create mode 100644 iconvdata/IBM1161.irreversible create mode 100644 iconvdata/IBM1163.irreversible create mode 100644 iconvdata/IBM1164.irreversible create mode 100644 iconvdata/IBM856.irreversible create mode 100644 iconvdata/IBM922.irreversible create mode 100644 iconvdata/TCVN5712-1.precomposed (limited to 'iconvdata') diff --git a/iconvdata/ARMSCII-8.irreversible b/iconvdata/ARMSCII-8.irreversible new file mode 100644 index 0000000000..1942592daf --- /dev/null +++ b/iconvdata/ARMSCII-8.irreversible @@ -0,0 +1,5 @@ +0xA4 0x0029 +0xA5 0x0028 +0xA9 0x002E +0xAB 0x002C +0xAC 0x002D diff --git a/iconvdata/IBM1132.irreversible b/iconvdata/IBM1132.irreversible new file mode 100644 index 0000000000..8535373dd5 --- /dev/null +++ b/iconvdata/IBM1132.irreversible @@ -0,0 +1 @@ +0x70 0x006B diff --git a/iconvdata/IBM1133.irreversible b/iconvdata/IBM1133.irreversible new file mode 100644 index 0000000000..c0cd850537 --- /dev/null +++ b/iconvdata/IBM1133.irreversible @@ -0,0 +1 @@ +0xDF 0x006B diff --git a/iconvdata/IBM1160.irreversible b/iconvdata/IBM1160.irreversible new file mode 100644 index 0000000000..494fef2da8 --- /dev/null +++ b/iconvdata/IBM1160.irreversible @@ -0,0 +1,4 @@ +0x51 0x0E48 +0xCA 0x0E49 +0xE1 0x0E4A +0xFD 0x0E4B diff --git a/iconvdata/IBM1161.irreversible b/iconvdata/IBM1161.irreversible new file mode 100644 index 0000000000..07150abae7 --- /dev/null +++ b/iconvdata/IBM1161.irreversible @@ -0,0 +1,4 @@ +0xA0 0x0E48 +0xDB 0x0E49 +0xDC 0x0E4A +0xDD 0x0E4B diff --git a/iconvdata/IBM1163.irreversible b/iconvdata/IBM1163.irreversible new file mode 100644 index 0000000000..1d052b399a --- /dev/null +++ b/iconvdata/IBM1163.irreversible @@ -0,0 +1,2 @@ +0xAF 0x203E +0xD0 0x00D0 diff --git a/iconvdata/IBM1164.irreversible b/iconvdata/IBM1164.irreversible new file mode 100644 index 0000000000..510651e184 --- /dev/null +++ b/iconvdata/IBM1164.irreversible @@ -0,0 +1,2 @@ +0xAC 0x00D0 +0xBC 0x203E diff --git a/iconvdata/IBM856.irreversible b/iconvdata/IBM856.irreversible new file mode 100644 index 0000000000..b2b53b4f09 --- /dev/null +++ b/iconvdata/IBM856.irreversible @@ -0,0 +1,36 @@ +0x01 0x263A +0x02 0x263B +0x03 0x2665 +0x04 0x2666 +0x05 0x2663 +0x06 0x2660 +0x08 0x25D8 +0x09 0x25CB +0x09 0xFFEE +0x0A 0x25D9 +0x0B 0x2642 +0x0C 0x2640 +0x0D 0x266A +0x0E 0x266B +0x0F 0x263C +0x10 0x25BA +0x11 0x25C4 +0x12 0x2195 +0x13 0x203C +0x16 0x25AC +0x17 0x21A8 +0x18 0x2191 +0x18 0xFFEA +0x19 0x2193 +0x19 0xFFEC +0x1A 0x2192 +0x1A 0xFFEB +0x1B 0x2190 +0x1B 0xFFE9 +0x1C 0x221F +0x1D 0x2194 +0x1E 0x25B2 +0x1F 0x25BC +0x7F 0x2302 +0xB3 0xFFE8 +0xFE 0xFFED diff --git a/iconvdata/IBM922.irreversible b/iconvdata/IBM922.irreversible new file mode 100644 index 0000000000..7d23de1b22 --- /dev/null +++ b/iconvdata/IBM922.irreversible @@ -0,0 +1,69 @@ +0x01 0x263A +0x02 0x263B +0x03 0x2665 +0x04 0x2666 +0x05 0x2663 +0x06 0x2660 +0x07 0x2022 +0x08 0x25D8 +0x09 0x25CB +0x09 0xFFEE +0x0A 0x25D9 +0x0B 0x2642 +0x0C 0x2640 +0x0D 0x266A +0x0E 0x266C +0x0F 0x263C +0x10 0x25BA +0x11 0x25C4 +0x12 0x2195 +0x13 0x203C +0x16 0x25AC +0x17 0x21A8 +0x18 0x2191 +0x18 0xFFEA +0x19 0x2193 +0x19 0xFFEC +0x1A 0x2192 +0x1A 0xFFEB +0x1B 0x2190 +0x1B 0xFFE9 +0x1C 0x221F +0x1D 0x2194 +0x1E 0x25B2 +0x1F 0x25BC +0x80 0x2591 +0x81 0x2592 +0x82 0x2593 +0x83 0x2502 +0x83 0xFFE8 +0x84 0x2524 +0x85 0x2518 +0x86 0x250C +0x87 0x2588 +0x88 0x2584 +0x89 0x2563 +0x8A 0x2551 +0x8B 0x2557 +0x8C 0x255D +0x8D 0x2580 +0x8E 0x2265 +0x8F 0x2510 +0x90 0x2514 +0x91 0x2534 +0x92 0x252C +0x93 0x251C +0x94 0x2500 +0x95 0x253C +0x96 0x25A0 +0x96 0xFFED +0x97 0x2017 +0x98 0x255A +0x99 0x2554 +0x9A 0x2569 +0x9B 0x2566 +0x9C 0x2560 +0x9D 0x2550 +0x9E 0x256C +0x9F 0x2264 +0xAF 0x203E diff --git a/iconvdata/Makefile b/iconvdata/Makefile index bdbee356ac..dc0ec65bc8 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -106,6 +106,10 @@ distribute := gconv-modules extra-module.mk gap.awk gaptab.awk \ EUC-JP.irreversible ISIRI-3342.irreversible SJIS.irreversible \ EUC-KR.irreversible BIG5HKSCS.irreversible BIG5.irreversible \ CP1255.irreversible CP1258.irreversible EUC-TW.irreversible \ + IBM856.irreversible IBM922.irreversible IBM1132.irreversible \ + IBM1133.irreversible IBM1160.irreversible IBM1161.irreversible\ + IBM1163.irreversible IBM1164.irreversible \ + ARMSCII-8.irreversible TCVN5712-1.precomposed \ 8bit-generic.c 8bit-gap.c \ ansi_x3.110.c asmo_449.c big5.c cp737.c cp737.h \ cp775.c cp775.h ibm874.c cns11643.c cns11643.h \ diff --git a/iconvdata/TCVN5712-1.precomposed b/iconvdata/TCVN5712-1.precomposed new file mode 100644 index 0000000000..ae37b0f185 --- /dev/null +++ b/iconvdata/TCVN5712-1.precomposed @@ -0,0 +1,56 @@ +0x42B4 0x1E04 +0x43B3 0x0106 +0x44B4 0x1E0C +0x47B3 0x01F4 +0x48B4 0x1E24 +0x4BB3 0x1E30 +0x4BB4 0x1E32 +0x4CB3 0x0139 +0x4CB4 0x1E36 +0x4DB3 0x1E3E +0x4DB4 0x1E42 +0x4EB0 0x01F8 +0x4EB2 0x00D1 +0x4EB3 0x0143 +0x4EB4 0x1E46 +0x50B3 0x1E54 +0x52B3 0x0154 +0x52B4 0x1E5A +0x53B3 0x015A +0x53B4 0x1E62 +0x54B4 0x1E6C +0x56B2 0x1E7C +0x56B4 0x1E7E +0x57B0 0x1E80 +0x57B3 0x1E82 +0x57B4 0x1E88 +0x5AB3 0x0179 +0x5AB4 0x1E92 +0x62B4 0x1E05 +0x63B3 0x0107 +0x64B4 0x1E0D +0x67B3 0x01F5 +0x68B4 0x1E25 +0x6BB3 0x1E31 +0x6BB4 0x1E33 +0x6CB3 0x013A +0x6CB4 0x1E37 +0x6DB3 0x1E3F +0x6DB4 0x1E43 +0x6EB0 0x01F9 +0x6EB2 0x00F1 +0x6EB3 0x0144 +0x6EB4 0x1E47 +0x70B3 0x1E55 +0x72B3 0x0155 +0x72B4 0x1E5B +0x73B3 0x015B +0x73B4 0x1E63 +0x74B4 0x1E6D +0x76B2 0x1E7D +0x76B4 0x1E7F +0x77B0 0x1E81 +0x77B3 0x1E83 +0x77B4 0x1E89 +0x7AB3 0x017A +0x7AB4 0x1E93 diff --git a/iconvdata/armscii-8.c b/iconvdata/armscii-8.c index ca2e689a49..685736eb7d 100644 --- a/iconvdata/armscii-8.c +++ b/iconvdata/armscii-8.c @@ -1,5 +1,5 @@ -/* Conversion to and from ISO 8859-1. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Conversion to and from ARMSCII-8 + Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -61,7 +61,7 @@ static const uint16_t map_from_armscii_8[0xfe - 0xa2 + 1] = *((uint32_t *) outptr)++ = ch; \ else if (ch >= 0xa2 && ch <= 0xfe) \ /* Use the table. */ \ - *((uint32_t *) outptr)++ = map_from_armscii_8[ch]; \ + *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2]; \ else \ { \ /* This is an illegal character. */ \ @@ -114,7 +114,7 @@ static const unsigned char map_to_armscii_8[0x58a - 0x531 + 1] = *outptr = 0xa6; \ else if (ch >= 0x531 && ch <= 0x58a) \ { \ - unsigned char oc = map_to_armscii_8[ch]; \ + unsigned char oc = map_to_armscii_8[ch - 0x531]; \ \ if (oc == 0) \ /* No valid mapping. */ \ diff --git a/iconvdata/tcvn5712-1.c b/iconvdata/tcvn5712-1.c index a3b5ad24fd..bcf002fb88 100644 --- a/iconvdata/tcvn5712-1.c +++ b/iconvdata/tcvn5712-1.c @@ -508,7 +508,7 @@ static const unsigned char from_ucs4[] = #define FROM_IDX_04 (FROM_IDX_03 + 17) 0xb0, 0xb3, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x0300-0x0307 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0308-0x030f */ + 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0308-0x030f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0310-0x0317 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0318-0x031f */ 0x00, 0x00, 0x00, 0xb4, /* 0x0320-0x0323 */ diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh index fb427034eb..7b3ad92c1e 100755 --- a/iconvdata/tst-table.sh +++ b/iconvdata/tst-table.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Bruno Haible , 2000. # @@ -39,7 +39,10 @@ ${SHELL} tst-table-charmap.sh ${charmap:-$charset} \ < ../localedata/charmaps/${charmap:-$charset} \ > ${objpfx}tst-${charset}.charmap.table -# Precompute expected differences between the two iconv directions. +# Precomputed expexted differences between the charmap and iconv forward. +precomposed=${charset}.precomposed + +# Precompute expected differences between the charmap and iconv backward. if test ${charset} = EUC-TW; then irreversible=${objpfx}tst-${charset}.irreversible (grep '^0x8EA1' ${objpfx}tst-${charset}.charmap.table @@ -59,29 +62,37 @@ ${common_objpfx}elf/ld.so --library-path $common_objpfx \ ${objpfx}tst-table-to ${charset} | sort \ > ${objpfx}tst-${charset}.inverse.table -# Difference between the two iconv directions. -diff ${objpfx}tst-${charset}.table ${objpfx}tst-${charset}.inverse.table | \ +# Difference between the charmap and iconv backward. +diff ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table | \ grep '^[<>]' | sed -e 's,^. ,,' > ${objpfx}tst-${charset}.irreversible.table -# Check 1: charmap and iconv forward should be identical. +# Check 1: charmap and iconv forward should be identical, except for +# precomposed characters. if test ${charset} = GB18030; then grep '0x....$' < ${objpfx}tst-${charset}.charmap.table \ > ${objpfx}tst-${charset}.truncated.table cmp -s ${objpfx}tst-${charset}.truncated.table ${objpfx}tst-${charset}.table || exit 1 else - cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table || - exit 1 + if test -f ${precomposed}; then + cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u \ + > ${objpfx}tst-${charset}.tmp.table + cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp.table || + exit 1 + else + cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table || + exit 1 + fi fi -# Check 2: the difference between the two iconv directions. +# Check 2: the difference between the charmap and iconv backward. if test -f ${irreversible}; then cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u \ > ${objpfx}tst-${charset}.tmp.table cmp -s ${objpfx}tst-${charset}.tmp.table ${objpfx}tst-${charset}.inverse.table || exit 1 else - cmp -s ${objpfx}tst-${charset}.table ${objpfx}tst-${charset}.inverse.table || + cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table || exit 1 fi diff --git a/iconvdata/tst-tables.sh b/iconvdata/tst-tables.sh index ce706aa625..0983052260 100755 --- a/iconvdata/tst-tables.sh +++ b/iconvdata/tst-tables.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Bruno Haible , 2000. # @@ -76,7 +76,6 @@ cat <