summaryrefslogtreecommitdiffstats
path: root/man3/iconv.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/iconv.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/iconv.3')
-rw-r--r--man3/iconv.319
1 files changed, 9 insertions, 10 deletions
diff --git a/man3/iconv.3 b/man3/iconv.3
index 6e4a091..1f9f96f 100644
--- a/man3/iconv.3
+++ b/man3/iconv.3
@@ -11,7 +11,7 @@
.\" 2000-06-30 correction by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
.\" 2000-11-15 aeb, fixed prototype
.\"
-.TH iconv 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH iconv 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
iconv \- perform character set conversion
.SH LIBRARY
@@ -20,7 +20,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <iconv.h>
-.PP
+.P
.BI "size_t iconv(iconv_t " cd ,
.BI " char **restrict " inbuf ", size_t *restrict " inbytesleft ,
.BI " char **restrict " outbuf ", size_t *restrict " outbytesleft );
@@ -50,7 +50,7 @@ argument is the address of a variable that points to
the first byte available in the output buffer;
.I outbytesleft
indicates the number of bytes available in the output buffer.
-.PP
+.P
The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL.
In this case, the
.BR iconv ()
@@ -58,7 +58,7 @@ function converts the multibyte sequence
starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP.
At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read.
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
-.PP
+.P
The
.BR iconv ()
function converts one multibyte character at a time, and for
@@ -134,7 +134,7 @@ beginning of the incomplete multibyte sequence.
The output buffer has no more room for the next converted character.
In this case, it sets \fIerrno\fP to \fBE2BIG\fP and returns
.IR (size_t)\ \-1 .
-.PP
+.P
A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL.
In this case, the
@@ -148,7 +148,7 @@ If the output buffer has no more room for this reset sequence, it sets
Otherwise, it increments
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
written.
-.PP
+.P
A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and
\fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL.
In this case, the
@@ -191,8 +191,7 @@ T{
.BR iconv ()
T} Thread safety MT-Safe race:cd
.TE
-.sp 1
-.PP
+.P
The
.BR iconv ()
function is MT-Safe, as long as callers arrange for
@@ -209,7 +208,7 @@ In each series of calls to
.BR iconv (),
the last should be one with \fIinbuf\fP or \fI*inbuf\fP equal to NULL,
in order to flush out any partially converted input.
-.PP
+.P
Although
.I inbuf
and
@@ -221,7 +220,7 @@ as C strings or as arrays of characters:
the interpretation of character byte sequences is
handled internally by the conversion functions.
In some encodings, a zero byte may be a valid part of a multibyte character.
-.PP
+.P
The caller of
.BR iconv ()
must ensure that the pointers passed to the function are suitable