summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-09-14 16:02:50 -0600
committerKarl Williamson <khw@cpan.org>2016-09-17 17:22:24 -0600
commit111fa70000f00b5976674ebcee575247e12e0926 (patch)
tree0d24c3f514d55e908e2d4afb7f257bcd6ad1d0ff /utf8.c
parentf66ccb6c49140b3167e4e605ce87d137725df9e7 (diff)
downloadperl-111fa70000f00b5976674ebcee575247e12e0926.tar.gz
perlapi: Clarify utf8n_to_uvchr entry
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/utf8.c b/utf8.c
index 0fcb6b6328..cfdbfe2ae2 100644
--- a/utf8.c
+++ b/utf8.c
@@ -488,9 +488,10 @@ C<retlen> to C<-1> (cast to C<STRLEN>) and return zero.
Note that this API requires disambiguation between successful decoding a C<NUL>
character, and an error return (unless the C<UTF8_CHECK_ONLY> flag is set), as
-in both cases, 0 is returned. To disambiguate, upon a zero return, see if the
-first byte of C<s> is 0 as well. If so, the input was a C<NUL>; if not, the
-input had an error.
+in both cases, 0 is returned, and, depending on the malformation, C<retlen> may
+be set to 1. To disambiguate, upon a zero return, see if the first byte of
+C<s> is 0 as well. If so, the input was a C<NUL>; if not, the input had an
+error.
Certain code points are considered problematic. These are Unicode surrogates,
Unicode non-characters, and code points above the Unicode maximum of 0x10FFFF.