mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-17 03:49:46 +08:00
786ab12ce2
* acinclude.m4 (--enable-newlib-iconv): New configuration option. (--enable-newlib-builtin-converters): Ditto. * configure.in: Add code to set _ICONV_ENABLED flag. Set _MB_LEN_MAX to 1 if not mb enabled. * configure: Regenerated. * aclocal.m4: Ditto. * Makefile.in: Ditto. * newlib.hin: Add _ICONV_ENABLED flag. * libc/Makefile.am: Add support for iconv. * libc/configure.in: Ditto. * libc/Makefile.in: Regenerated. * libc/aclocal.m4: Ditto. * libc/configure: Ditto. * libc/libc.texinfo: Add iconv documentation. * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am, libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL, libc/iconv/README.TODO, libc/iconv/charset.aliases, libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am, libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES, libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c, libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c, libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c, libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c, libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c, libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c, libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c, libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c, libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c, libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c, libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c, libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c, libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in, libc/iconv/ccs/binary/big5.cct, libc/iconv/ccs/binary/cns11643_plane1.cct, libc/iconv/ccs/binary/cns11643_plane14.cct, libc/iconv/ccs/binary/cns11643_plane2.cct, libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct, libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct, libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct, libc/iconv/ccs/binary/iso_8859_1.cct, libc/iconv/ccs/binary/iso_8859_15.cct, libc/iconv/ccs/binary/iso_8859_2.cct, libc/iconv/ccs/binary/iso_8859_4.cct, libc/iconv/ccs/binary/iso_8859_5.cct, libc/iconv/ccs/binary/jis_x0201.cct, libc/iconv/ccs/binary/jis_x0208_1983.cct, libc/iconv/ccs/binary/jis_x0212_1990.cct, libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct, libc/iconv/ccs/binary/ksx1001.cct, libc/iconv/ccs/binary/shift_jis.cct, libc/iconv/ccs/binary/us_ascii.cct, libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in, libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c, libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c, libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c, libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c, libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c, libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in, libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c, libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c, libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c, libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c, libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c, libc/iconv/lib/deps.h, libc/iconv/lib/endian.h, libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c, libc/iconv/lib/local.h, libc/include/iconv.h: New files. * libc/sys/linux/include/iconv.h: Ditto. * libc/include/sys/_types.h (_iconv_t): Added. * doc/aclocal.m4: Regenerated. * doc/configure: Ditto. * doc/Makefile.in: Ditto. * iconvdata/Makefile.in: Ditto. * iconvdata/aclocal.m4: Ditto. * iconvdata/configure: Ditto. * libc/*aclocal.m4: Ditto. * libc/*Makefile.in: Ditto. * libc/*configure: Ditto. * libm/*aclocal.m4: Ditto. * libm/*Makefile.in: Ditto. * libm/*configure: Ditto.
69 lines
3.3 KiB
Plaintext
69 lines
3.3 KiB
Plaintext
ICONV - Charset Conversion Library. Version 2.0
|
|
-----------------------------------------------
|
|
|
|
This distribution provides:
|
|
* the library (libiconv.a and .so) for conversion between
|
|
various charsets (character encoding schemes);
|
|
* and the command line utility (iconv), providing
|
|
conversion of a file, standard input or its argument
|
|
line from one charset to another;
|
|
* a set of coded character set tables (binary files) and
|
|
character encoding schemes (dynamically loaded modules)
|
|
for use by the library;
|
|
* a utility for creating character set tables from Unicode
|
|
conversion tables and RFC1345-style charset descriptions.
|
|
|
|
Syntax of the library functions (iconv_open, iconv, iconv_close)
|
|
and the utility is described in the man pages.
|
|
|
|
Features of the library:
|
|
- Coded character set (CCS) tables are binary files containing
|
|
pairs of tables for converting characters from some charset to
|
|
Unicode (UCS-2 in host byte order) and vice versa. There are 4
|
|
types of tables supported in iconv-2.0: for 7-bit, 8-bit, 14-bit
|
|
and 16-bit charsets. The library uses memory mapping (in
|
|
read-only mode) to access the table data.
|
|
- Character encoding schemes (CES) are small sets of C structures
|
|
and functions. The functions implement virtual methods for
|
|
converting a sequence of characters in some charset to a Unicode
|
|
character (UCS-4 in host byte order). Each encoding scheme is
|
|
located in a separate C file and can be compiled to a dynamically
|
|
loaded shared module.
|
|
- A universal CES for all table driven charsets is compiled into
|
|
the library and used for all CCS tables.
|
|
- Both CCS tables and CES C code can be built into the library by
|
|
specifying the corresponding charset name in the
|
|
ICONV_BUILTIN_CHARSETS make variable. By default us-ascii, utf-8
|
|
and ucs-4-internal are built in (plus the CES for all CCS
|
|
tables). All the CES modules are included to a static version of
|
|
the library (libiconv.a).
|
|
- Multiple aliases for every charset are supported. All aliases are
|
|
listed in the charset.aliases file(s). The library uses memory
|
|
mapping to parse alias information and find a canonical name
|
|
of a charset before looking it up in the internal list or
|
|
external table or shared module. Alias information can also be
|
|
compiled into the library (which is useful for compiled-in
|
|
charsets ;-)
|
|
- ISO/IEC 10646 conformance of the internal representation of
|
|
characters; conversion is done in two steps:
|
|
(1) a sequence of zero or more bytes from input buffer coded in
|
|
the source charset is converted to exactly one valid UCS-4
|
|
character and
|
|
(2) the UCS-4 character is converted to a sequence of zero or
|
|
more bytes in the target charset to the output buffer.
|
|
In the case when two charset names are found to be aliases
|
|
of the same charset, conversion is done via a simplified
|
|
converter by copying the data from the input buffer to the
|
|
output one.
|
|
- Open module API: adding new modules is easy. API has only been
|
|
documented via iconv.h file comments so far. A perl utility is
|
|
provided for conversion of Unicode charset tables
|
|
(http://www.unicode.org/Public/MAPPINGS/) and RFC1345-style
|
|
charset tables into the CCS format recognized by the library.
|
|
- API conformance to Unix98 specification.
|
|
- BSD-style copyright.
|
|
|
|
Konstantin Chuguev
|
|
<Konstantin.Chuguev@dante.org.uk>
|
|
November 2000.
|