summaryrefslogtreecommitdiff
path: root/pod/perlguts.pod
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-03-19 10:52:25 -0600
committerKarl Williamson <public@khwilliamson.com>2012-03-19 18:23:43 -0600
commit95701e00f8e747fe1c24564cb038be375695df5a (patch)
tree9a2e5cab3d0177782fe0cc457034e199e8d5683a /pod/perlguts.pod
parent8752e5a8bd5a13883a0909d80ec0e205f71f8dbd (diff)
downloadperl-95701e00f8e747fe1c24564cb038be375695df5a.tar.gz
perlguts, warnings.t: Update references to obsolete fcn names
These functions were replaced long ago, apparently in 5.8, but I didn't verify that for sure.
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r--pod/perlguts.pod13
1 files changed, 7 insertions, 6 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index e585171f90..ee938ea137 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -2671,21 +2671,22 @@ whether the byte can be encoded as a single byte even in UTF-8):
U8 *utf;
UV uv; /* Note: a UV, not a U8, not a char */
+ STRLEN len; /* length of character in bytes */
if (!UTF8_IS_INVARIANT(*utf))
/* Must treat this as UTF-8 */
- uv = utf8_to_uv(utf);
+ uv = utf8_to_uvchr(utf, &len);
else
/* OK to treat this character as a byte */
uv = *utf;
-You can also see in that example that we use C<utf8_to_uv> to get the
-value of the character; the inverse function C<uv_to_utf8> is available
+You can also see in that example that we use C<utf8_to_uvchr> to get the
+value of the character; the inverse function C<uvchr_to_utf8> is available
for putting a UV into UTF-8:
if (!UTF8_IS_INVARIANT(uv))
/* Must treat this as UTF8 */
- utf8 = uv_to_utf8(utf8, uv);
+ utf8 = uvchr_to_utf8(utf8, uv);
else
/* OK to treat this character as a byte */
*utf8++ = uv;
@@ -2791,13 +2792,13 @@ it's not - if you pass on the PV to somewhere, pass on the flag too.
=item *
-If a string is UTF-8, B<always> use C<utf8_to_uv> to get at the value,
+If a string is UTF-8, B<always> use C<utf8_to_uvchr> to get at the value,
unless C<UTF8_IS_INVARIANT(*s)> in which case you can use C<*s>.
=item *
When writing a character C<uv> to a UTF-8 string, B<always> use
-C<uv_to_utf8>, unless C<UTF8_IS_INVARIANT(uv))> in which case
+C<uvchr_to_utf8>, unless C<UTF8_IS_INVARIANT(uv))> in which case
you can use C<*s = uv>.
=item *