diff options
author | Karl Williamson <khw@cpan.org> | 2019-10-15 23:48:33 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-10-15 23:49:43 -0700 |
commit | f2c50040ce0dcb4f046ea35d05bb9f5ebc7cdb11 (patch) | |
tree | 8deb9c95c4b0c5446747be577c1b31c4e0b4abde | |
parent | 9786385e68f7f14df6f4dd0f04d2c72c0d9a2511 (diff) | |
download | perl-f2c50040ce0dcb4f046ea35d05bb9f5ebc7cdb11.tar.gz |
Document UTF8_MAXBYTES_CASE
-rw-r--r-- | utf8.h | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -426,14 +426,24 @@ encoded as UTF-8. C<cp> is a native (ASCII or EBCDIC) code point if less than * continuation byte */ #define MAX_PORTABLE_UTF8_TWO_BYTE (32 * (1U << 5) - 1) -/* The maximum number of UTF-8 bytes a single Unicode character can - * uppercase/lowercase/fold into. Unicode guarantees that the maximum - * expansion is UTF8_MAX_FOLD_CHAR_EXPAND characters, but any above-Unicode - * code point will fold to itself, so we only have to look at the expansion of - * the maximum Unicode code point. But this number may be less than the space - * occupied by a very large code point under Perl's extended UTF-8. We have to - * make it large enough to fit any single character. (It turns out that ASCII - * and EBCDIC differ in which is larger) */ +/* + +=for apidoc AmnU|STRLEN|UTF8_MAXBYTES_CASE + +The maximum number of UTF-8 bytes a single Unicode character can +uppercase/lowercase/titlecase/fold into. + +=cut + + * Unicode guarantees that the maximum expansion is UTF8_MAX_FOLD_CHAR_EXPAND + * characters, but any above-Unicode code point will fold to itself, so we only + * have to look at the expansion of the maximum Unicode code point. But this + * number may be less than the space occupied by a very large code point under + * Perl's extended UTF-8. We have to make it large enough to fit any single + * character. (It turns out that ASCII and EBCDIC differ in which is larger) + * +=cut +*/ #define UTF8_MAXBYTES_CASE \ (UTF8_MAXBYTES >= (UTF8_MAX_FOLD_CHAR_EXPAND * OFFUNISKIP(0x10FFFF)) \ ? UTF8_MAXBYTES \ |