summaryrefslogtreecommitdiff
path: root/pod/perlapi.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-08 16:33:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-08 16:33:39 +0000
commit28d3d195b04c40a4811db0a74e089d561a53d924 (patch)
treebdd0f4c521d3fd304c4ceca9c8acedf52302b4b9 /pod/perlapi.pod
parent659f4fc511096e10da01a8fc865bdea31f309580 (diff)
downloadperl-28d3d195b04c40a4811db0a74e089d561a53d924.tar.gz
Do not return the Unicode replacement character if UTF-8
decoding goes awry, it should be up to the caller to decide. p4raw-id: //depot/perl@8042
Diffstat (limited to 'pod/perlapi.pod')
-rw-r--r--pod/perlapi.pod12
1 files changed, 7 insertions, 5 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 7fdc55e63d..cf7c5dbda9 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -3279,11 +3279,13 @@ and the pointer C<s> will be advanced to the end of the character.
If C<s> does not point to a well-formed UTF8 character, the behaviour
is dependent on the value of C<flags>: if it contains UTF8_CHECK_ONLY,
it is assumed that the caller will raise a warning, and this function
-will set C<retlen> to C<-1> and return zero. If the C<flags> does not
-contain UTF8_CHECK_ONLY, the UNICODE_REPLACEMENT (0xFFFD) will be
-returned, and C<retlen> will be set to the expected length of the
-UTF-8 character in bytes. The C<flags> can also contain various flags
-to allow deviations from the strict UTF-8 encoding (see F<utf8.h>).
+will silently just set C<retlen> to C<-1> and return zero. If the
+C<flags> does not contain UTF8_CHECK_ONLY, warnings about
+malformations will be given, C<retlen> will be set to the expected
+length of the UTF-8 character in bytes, and zero will be returned.
+
+The C<flags> can also contain various flags to allow deviations from
+the strict UTF-8 encoding (see F<utf8.h>).
U8* s utf8_to_uv(STRLEN curlen, STRLEN *retlen, U32 flags)