Encode a code point number into the UTF-8 encoding.
Description
This encoder implements the UTF-8 encoding algorithm for converting a code point into a byte sequence. If it receives an invalid code point it will return the Unicode Replacement Character U+FFFD �. Example: '🅰' === WP_HTML_Decoder::code_point_to_utf8_bytes( 0x1f170 );
// Half of a surrogate pair is an invalid code point.
'�' === WP_HTML_Decoder::code_point_to_utf8_bytes( 0xd83c );
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/html-api/class-wp-html-decoder.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.