aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2012-05-04 09:52:09 +1200
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-05-07 15:30:16 +1200
commit2d17a61d47b338f2dec186f570a523dca9e5afea (patch)
tree70111290257814ddfbd27d4e3aa34056788ca3b9
parentf9b75bd469c4398975e113bf3f95c3acd7a5be31 (diff)
downloadman-pages-2d17a61d47b338f2dec186f570a523dca9e5afea.tar.gz
iconv.3: Upstream useful NOTE from Debian
Warn the reader that the pointer arguments can't be interpreted as C style strings. Also, note possible alignment requirements for the referenced bytes sequences, Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/iconv.319
1 files changed, 19 insertions, 0 deletions
diff --git a/man3/iconv.3 b/man3/iconv.3
index 23e717b6f4..c9f3e6f0e1 100644
--- a/man3/iconv.3
+++ b/man3/iconv.3
@@ -139,6 +139,25 @@ An incomplete multibyte sequence has been encountered in the input.
This function is available in glibc since version 2.1.
.SH "CONFORMING TO"
POSIX.1-2001.
+.SH NOTES
+Although
+.I inbuf
+and
+.I outbuf
+are typed as
+.IR "char\ **" ,
+this does not mean that the objects they point can be interpreted
+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.
+
+The caller of
+.BR iconv ()
+must ensure that the pointers passed to the function are suitable
+for accessing characters in the appropriate character set.
+This includes ensuring correct alignment on platforms that have
+tight restrictions on alignment.
.SH "SEE ALSO"
.BR iconv_close (3),
.BR iconv_open (3)