@@ -406,6 +406,42 @@ well.
406
406
407
407
=item *
408
408
409
+ New API functions are introduced to convert strings encoded in UTF-8 to
410
+ their ordinal code point equivalent. These are safe to use by default,
411
+ and generally more convenient to use than the existing ones.
412
+
413
+ L<perlapi/C<utf8_to_uv>> replaces L<perlapi/C<utf8_to_uvchr>> (which is
414
+ retained for backwards compatibility), but you should convert to use the
415
+ new form, as likely you aren't using the old one safely.
416
+
417
+ There are also two new functions, L<perlapi/C<strict_utf8_to_uv>> and
418
+ L<perlapi/C<c9strict_utf8_to_uv>> which do the same thing except when
419
+ the input string represents a code point that Unicode doesn't accept as
420
+ legal for interchange, using either the strict original definition
421
+ (C<strict_utf8_to_uv>), or the looser one given by
422
+ L<Unicode Corrigendum #9|https://www.unicode.org/versions/corrigendum9.html>
423
+ (C<c9strict_utf8_to_uv>). When the input string represents one of the
424
+ restricted code points, these functions return the Unicode
425
+ C<REPLACEMENT CHARACTER> instead.
426
+
427
+ Also L<perlapi/C<extended_utf8_to_uv>> is a synonym for C<utf8_to_uv>, for use
428
+ when you want to emphasize that the entire range of Perl extended UTF-8
429
+ is acceptable.
430
+
431
+ There are also replacement functions for the three more specialized
432
+ conversion functions that you are unlikely to need to use. Again, the
433
+ old forms are kept for backwards compatibility, but you should convert
434
+ to use the new forms.
435
+
436
+ L<perlapi/C<utf8_to_uv_flags>> replaces L<perlapi/C<utf8n_to_uvchr>>.
437
+
438
+ L<perlapi/C<utf8_to_uv_errors>> replaces L<perlapi/C<utf8n_to_uvchr_error>>.
439
+
440
+ L<perlapi/C<utf8_to_uv_msgs>> replaces
441
+ L<perlapi/C<utf8n_to_uvchr_msgs>>.
442
+
443
+ =item *
444
+
409
445
Three new API functions are introduced to convert strings encoded in
410
446
UTF-8 to native bytes format (if possible). These are easier to use
411
447
than the existing ones, and they avoid unnecessary memory allocations.
0 commit comments