ICONV_OPEN
NAMESYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
VERSIONS
CONFORMING TO
SEE ALSO
COLOPHON
NAME
iconv_open − allocate descriptor for character set conversion
SYNOPSIS
#include <iconv.h>
iconv_t iconv_open(const char *tocode, const char *fromcode);
DESCRIPTION
The iconv_open() function allocates a conversion descriptor suitable for converting byte sequences from character encoding fromcode to character encoding tocode.
The values
permitted for fromcode and tocode and the
supported combinations are system-dependent. For the GNU C
library, the permitted values are listed by the iconv
−−list command, and all combinations of the
listed values are supported. Furthermore the GNU C library
and the GNU libiconv library support the following two
suffixes:
//TRANSLIT
When the string "//TRANSLIT" is appended to tocode, 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.
//IGNORE
When the string "//IGNORE" is appended to tocode, characters that cannot be represented in the target character set will be silently discarded.
The resulting conversion descriptor can be used with iconv(3) any number of times. It remains valid until deallocated using iconv_close(3).
A conversion descriptor contains a conversion state. After creation using iconv_open(), the state is in the initial state. Using iconv(3) 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 iconv(3) with NULL as inbuf argument.
RETURN VALUE
The iconv_open() function returns a freshly allocated conversion descriptor. In case of error, it sets errno and returns (iconv_t) −1.
ERRORS
The following error can occur, among others:
EINVAL |
The conversion from fromcode to tocode is not supported by the implementation. |
VERSIONS
This function is available in glibc since version 2.1.
CONFORMING TO
UNIX98, POSIX.1-2001.
SEE ALSO
iconv(1), iconv(3), iconv_close(3)
COLOPHON
This page is part of release 3.69 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at http://www.kernel.org/doc/man−pages/.
More Linux Commands
manpages/curs_set_sp.3ncurses.html
curs_set_sp(3ncurses) - curses screen-pointer extension.....
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th
manpages/gnutls_x509_privkey_import_ecc_raw.3.html
gnutls_x509_privkey_import_ecc_raw(3) - API function........
This function will convert the given elliptic curve parameters to the native gnutls_x509_privkey_t format. The output will be stored in key. RETURNS On success,
manpages/strspn.3.html
strspn(3) - search a string for a set of characters.........
The strspn() function calculates the length (in bytes) of the initial segment of s which consists entirely of bytes in accept. The strcspn() function calculates
manpages/XDGACopyTransparentArea.3.html
XDGACopyTransparentArea(3) - Client library for the XFree86-
The XFree86-DGA extension is an X server extension for allowing client programs direct access to the video frame buffer. This is a brief description of the prog
manpages/abort.3.html
abort(3) - cause abnormal process termination (Man Page)....
The abort() first unblocks the SIGABRT signal, and then raises that signal for the calling process. This results in the abnormal termination of the process unle
manpages/mvin_wchstr.3ncurses.html
mvin_wchstr(3ncurses) - get an array of complex characters a
These functions return an array of complex characters in wchstr, starting at the current cursor position in the named window. Attributes (rendition) are stored
manpages/keymaps.5.html
keymaps(5) - keyboard table descriptions for loadkeys and du
These files are used by loadkeys(1) to modify the translation tables used by the kernel keyboard driver and generated by dumpkeys(1) from those translation tabl
manpages/XDrawString16.3.html
XDrawString16(3) - draw text characters - Linux manual page
Each character image, as defined by the font in the GC, is treated as an additional mask for a fill operation on the drawable. The drawable is modified only whe
manpages/pam_sm_acct_mgmt.3.html
pam_sm_acct_mgmt(3) - PAM service function for account manag
The pam_sm_acct_mgmt function is the service modules implementation of the pam_acct_mgmt(3) interface. This function performs the task of establishing whether t
manpages/truncf.3.html
truncf(3) - round to integer, toward zero - Linux man page
These functions round x to the nearest integer not larger in absolute value. RETURN VALUE These functions return the rounded integer value. If x is integral, in
manpages/git-mergetool--lib.1.html
git-mergetool--lib(1) - Common git merge tool shell scriptle
git-mergetool--lib.1 - This is not a command the end user would want to run. Ever. This documentation is meant for people who are studying the Porcelain-ish scr
manpages/sysctl.conf.5.html
sysctl.conf(5) - sysctl(8) preload/configuration file.......
sysctl.conf is a simple file containing sysctl values to be read in and set by sysctl. The syntax is simply as follows: # comment ; comment token = value Note t
