Edit

thodg/libiconv/man/iconv_open.3

Branch :

  • Show log

    Commit

  • Author : Bruno Haible
    Date : 2000-11-20 18:26:50
    Hash : fdd8e49f
    Message : Transliteration is now off by default.

  • man/iconv_open.3
  • .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
    .\"
    .\" This is free documentation; you can redistribute it and/or
    .\" modify it under the terms of the GNU General Public License as
    .\" published by the Free Software Foundation; either version 2 of
    .\" the License, or (at your option) any later version.
    .\"
    .\" References consulted:
    .\"   GNU glibc-2 source code and manual
    .\"   OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
    .\"
    .TH ICONV_OPEN 3  "October 23, 2000" "GNU" "Linux Programmer's Manual"
    .SH NAME
    iconv_open \- allocate descriptor for character set conversion
    .SH SYNOPSIS
    .nf
    .B #include <iconv.h>
    .sp
    .BI "iconv_t iconv_open (const char* " tocode ", const char* " fromcode );
    .fi
    .SH DESCRIPTION
    The \fBiconv_open\fP function allocates a conversion descriptor suitable
    for converting byte sequences from character encoding \fIfromcode\fP to
    character encoding \fItocode\fP.
    .PP
    The values permitted for \fIfromcode\fP and \fItocode\fP and the supported
    combinations are system dependent. For the libiconv library, the following
    encodings are supported, in all combinations.
    .TP
    European languages
    ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
    KOI8-R, KOI8-U, KOI8-RU,
    CP{1250,1251,1252,1253,1254,1257}, CP{850,866},
    Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
    Mac{Cyrillic,Ukraine,Greek,Turkish},
    Macintosh
    .TP
    Semitic languages
    ISO-8859-{6,8}, CP{1255,1256}, Mac{Hebrew,Arabic}
    .TP
    Japanese
    EUC-JP, SHIFT-JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
    .TP
    Chinese
    EUC-CN, HZ, GBK, GB18030, EUC-TW, BIG5, CP950, BIG5HKSCS,
    ISO-2022-CN, ISO-2022-CN-EXT
    .TP
    Korean
    EUC-KR, CP949, ISO-2022-KR, JOHAB
    .TP
    Armenian
    ARMSCII-8
    .TP
    Georgian
    Georgian-Academy, Georgian-PS
    .TP
    Thai
    TIS-620, CP874, MacThai
    .TP
    Laotian
    MuleLao-1, CP1133
    .TP
    Vietnamese
    VISCII, TCVN, CP1258
    .TP
    Platform specifics
    HP-ROMAN8, NEXTSTEP
    .TP
    Full Unicode
    .nf
    UTF-8
    UCS-2, UCS-2BE, UCS-2LE
    UCS-4, UCS-4BE, UCS-4LE
    UTF-16, UTF-16BE, UTF-16LE
    UTF-7
    JAVA
    .fi
    .TP
    Full Unicode, in terms of \fBuint16_t\fP or \fBuint32_t\fP
    (with machine dependent endianness and alignment)
    UCS-2-INTERNAL, UCS-4-INTERNAL
    .PP
    When the string "//TRANSLIT" is appended to \fItocode\fP, transliteration
    is activated. This means that when a character cannot be represented in the
    target character set, it can be approximated through one or several
    similarly looking characters.
    .PP
    The resulting conversion descriptor can be used with \fBiconv\fP any number
    of times. It remains valid until deallocated using \fBiconv_close\fP.
    .PP
    A conversion descriptor contains a conversion state. After creation using
    \fBiconv_open\fP, the state is in the initial state. Using \fBiconv\fP
    modifies the descriptor's conversion state. (This implies that a conversion
    descriptor can not be used in multiple threads simultaneously.) To bring the
    state back to the initial state, use \fBiconv\fP with NULL as \fIinbuf\fP
    argument.
    .SH "RETURN VALUE"
    The \fBiconv_open\fP function returns a freshly allocated conversion
    descriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(-1).
    .SH ERRORS
    The following error can occur, among others:
    .TP
    .B EINVAL
    The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
    implementation.
    .SH "CONFORMING TO"
    UNIX98
    .SH "SEE ALSO"
    .BR iconv "(3), " iconv_close (3)