⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iconv_open.3

📁 libiconv是一个很不错的字符集转换库。程序接口也很简单
💻 3
字号:
.\" Copyright (c) Bruno Haible <bruno@clisp.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  "May 26, 2002" "GNU" "Linux Programmer's Manual".SH NAMEiconv_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 DESCRIPTIONThe \fBiconv_open\fP function allocates a conversion descriptor suitablefor converting byte sequences from character encoding \fIfromcode\fP tocharacter encoding \fItocode\fP..PPThe values permitted for \fIfromcode\fP and \fItocode\fP and the supportedcombinations are system dependent. For the libiconv library, the followingencodings are supported, in all combinations..TPEuropean languages.nf.fiASCII, 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.TPSemitic languages.nf.fiISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}.TPJapanese.nf.fiEUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1.TPChinese.nf.fiEUC-CN, HZ, GBK, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS,ISO-2022-CN, ISO-2022-CN-EXT.TPKorean.nf.fiEUC-KR, CP949, ISO-2022-KR, JOHAB.TPArmenian.nf.fiARMSCII-8.TPGeorgian.nf.fiGeorgian-Academy, Georgian-PS.TPTajik.nf.fiKOI8-T.TPThai.nf.fiTIS-620, CP874, MacThai.TPLaotian.nf.fiMuleLao-1, CP1133.TPVietnamese.nf.fiVISCII, TCVN, CP1258.TPPlatform specifics.nf.fiHP-ROMAN8, NEXTSTEP.TPFull Unicode.nf.fiUTF-8.nf.fiUCS-2, UCS-2BE, UCS-2LE.nf.fiUCS-4, UCS-4BE, UCS-4LE.nf.fiUTF-16, UTF-16BE, UTF-16LE.nf.fiUTF-32, UTF-32BE, UTF-32LE.nf.fiUTF-7.nf.fiC99, JAVA.TPFull Unicode, in terms of \fBuint16_t\fP or \fBuint32_t\fP(with machine dependent endianness and alignment).nf.fiUCS-2-INTERNAL, UCS-4-INTERNAL.TPLocale dependent, in terms of \fBchar\fP or \fBwchar_t\fP(with machine dependent endianness and alignment, and with semanticsdepending on the OS and the current LC_CTYPE locale facet).nf.fichar, wchar_t.PPWhen configured with the option \fB\-\-enable-extra-encodings\fP, it alsoprovides support for a few extra encodings:.TPEuropean languages.nfCP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}.fi.TPSemitic languages.nf.fiCP864.TPJapanese.nf.fiEUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3.TPTurkmen.nf.fiTDS565.TPPlatform specifics.nf.fiRISCOS-LATIN1.PPThe empty encoding name "" is equivalent to "char": it denotes thelocale dependent character encoding..PPWhen the string "//TRANSLIT" is appended to \fItocode\fP, transliterationis activated. This means that when a character cannot be represented in thetarget character set, it can be approximated through one or severalsimilarly looking characters..PPWhen the string "//IGNORE" is appended to \fItocode\fP, characters thatcannot be represented in the target character set will be silently discarded..PPThe resulting conversion descriptor can be used with \fBiconv\fP any numberof times. It remains valid until deallocated using \fBiconv_close\fP..PPA conversion descriptor contains a conversion state. After creation using\fBiconv_open\fP, the state is in the initial state. Using \fBiconv\fPmodifies the descriptor's conversion state. (This implies that a conversiondescriptor can not be used in multiple threads simultaneously.) To bring thestate back to the initial state, use \fBiconv\fP with NULL as \fIinbuf\fPargument..SH "RETURN VALUE"The \fBiconv_open\fP function returns a freshly allocated conversiondescriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(-1)..SH ERRORSThe following error can occur, among others:.TP.B EINVALThe conversion from \fIfromcode\fP to \fItocode\fP is not supported by theimplementation..SH "CONFORMING TO"UNIX98.SH "SEE ALSO".BR iconv "(3), " iconv_close (3)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -