logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

iconv_open.3p (3572B)


  1. '\" et
  2. .TH ICONV_OPEN "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. iconv_open
  12. \(em codeset conversion allocation function
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <iconv.h>
  17. .P
  18. iconv_t iconv_open(const char *\fItocode\fP, const char *\fIfromcode\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIiconv_open\fR()
  23. function shall return a conversion descriptor
  24. that describes a conversion from the codeset specified by the string
  25. pointed to by the
  26. .IR fromcode
  27. argument to the codeset specified by the string pointed to by the
  28. .IR tocode
  29. argument. For state-dependent encodings, the conversion descriptor
  30. shall be in a codeset-dependent initial shift state, ready for
  31. immediate use with
  32. \fIiconv\fR().
  33. .P
  34. Settings of
  35. .IR fromcode
  36. and
  37. .IR tocode
  38. and their permitted combinations are implementation-defined.
  39. .P
  40. A conversion descriptor shall remain valid until it is closed by
  41. \fIiconv_close\fR()
  42. or an implicit close.
  43. .P
  44. If a file descriptor is used to implement conversion descriptors, the
  45. FD_CLOEXEC flag shall be set; see
  46. .IR <fcntl.h> .
  47. .SH "RETURN VALUE"
  48. Upon successful completion,
  49. \fIiconv_open\fR()
  50. shall return a conversion descriptor for use on subsequent calls to
  51. \fIiconv\fR().
  52. Otherwise,
  53. \fIiconv_open\fR()
  54. shall return (\fBiconv_t\fP)\-1 and set
  55. .IR errno
  56. to indicate the error.
  57. .SH ERRORS
  58. The
  59. \fIiconv_open\fR()
  60. function may fail if:
  61. .TP
  62. .BR EMFILE
  63. All file descriptors available to the process are currently open.
  64. .TP
  65. .BR ENFILE
  66. Too many files are currently open in the system.
  67. .TP
  68. .BR ENOMEM
  69. Insufficient storage space is available.
  70. .TP
  71. .BR EINVAL
  72. The conversion specified by
  73. .IR fromcode
  74. and
  75. .IR tocode
  76. is not supported by the implementation.
  77. .LP
  78. .IR "The following sections are informative."
  79. .SH EXAMPLES
  80. None.
  81. .SH "APPLICATION USAGE"
  82. Some implementations of
  83. \fIiconv_open\fR()
  84. use
  85. \fImalloc\fR()
  86. to allocate space for internal buffer areas. The
  87. \fIiconv_open\fR()
  88. function may fail if there is insufficient storage space to accommodate
  89. these buffers.
  90. .P
  91. Conforming applications must assume that conversion descriptors are not
  92. valid after a call to one of the
  93. .IR exec
  94. functions.
  95. .P
  96. Application developers should consult the system documentation to
  97. determine the supported codesets and their naming schemes.
  98. .SH RATIONALE
  99. None.
  100. .SH "FUTURE DIRECTIONS"
  101. None.
  102. .SH "SEE ALSO"
  103. .IR "\fIiconv\fR\^(\|)",
  104. .IR "\fIiconv_close\fR\^(\|)"
  105. .P
  106. The Base Definitions volume of POSIX.1\(hy2017,
  107. .IR "\fB<fcntl.h>\fP",
  108. .IR "\fB<iconv.h>\fP"
  109. .\"
  110. .SH COPYRIGHT
  111. Portions of this text are reprinted and reproduced in electronic form
  112. from IEEE Std 1003.1-2017, Standard for Information Technology
  113. -- Portable Operating System Interface (POSIX), The Open Group Base
  114. Specifications Issue 7, 2018 Edition,
  115. Copyright (C) 2018 by the Institute of
  116. Electrical and Electronics Engineers, Inc and The Open Group.
  117. In the event of any discrepancy between this version and the original IEEE and
  118. The Open Group Standard, the original IEEE and The Open Group Standard
  119. is the referee document. The original Standard can be obtained online at
  120. http://www.opengroup.org/unix/online.html .
  121. .PP
  122. Any typographical or formatting errors that appear
  123. in this page are most likely
  124. to have been introduced during the conversion of the source files to
  125. man page format. To report such errors, see
  126. https://www.kernel.org/doc/man-pages/reporting_bugs.html .