Title: wp-includes/compat-utf8.php | Developer.WordPress.org

---

# File: wp-includes/compat-utf8.php

 * function[_wp_utf8_codepoint_count()](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_count/)
 * Returns how many code points are found in the given UTF-8 string.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_count/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_count/#uses)
   | Source: [wp-includes/compat-utf8.php:341](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L341-L359)
 * function[_wp_utf8_codepoint_span()](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_span/)
 * Given a starting offset within a string and a maximum number of code points, 
   return how many bytes are occupied by the span of characters.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_span/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_utf8_codepoint_span/#uses)
   | Source: [wp-includes/compat-utf8.php:381](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L381-L401)
 * function[_wp_has_noncharacters_fallback()](https://developer.wordpress.org/reference/functions/_wp_has_noncharacters_fallback/)
 * Fallback support for determining if a string contains Unicode noncharacters.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_has_noncharacters_fallback/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_has_noncharacters_fallback/#uses)
   | Source: [wp-includes/compat-utf8.php:414](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L414-L426)
 * function[_wp_utf8_encode_fallback()](https://developer.wordpress.org/reference/functions/_wp_utf8_encode_fallback/)
 * Converts a string from ISO-8859-1 to UTF-8, maintaining backwards compatibility
   with the deprecated function from the PHP standard library.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_utf8_encode_fallback/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/_wp_utf8_encode_fallback/#uses)
   | Source: [wp-includes/compat-utf8.php:440](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L440-L480)
 * function[_wp_utf8_decode_fallback()](https://developer.wordpress.org/reference/functions/_wp_utf8_decode_fallback/)
 * Converts a string from UTF-8 to ISO-8859-1, maintaining backwards compatibility
   with the deprecated function from the PHP standard library.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_utf8_decode_fallback/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_utf8_decode_fallback/#uses)
   | Source: [wp-includes/compat-utf8.php:494](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L494-L565)
 * function[_wp_scan_utf8()](https://developer.wordpress.org/reference/functions/_wp_scan_utf8/)
 * Finds spans of valid and invalid UTF-8 bytes in a given string.
 * Used by [6 functions](https://developer.wordpress.org/reference/functions/_wp_scan_utf8/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/_wp_scan_utf8/#uses)
   | Source: [wp-includes/compat-utf8.php:47](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L47-L245)
 * function[_wp_is_valid_utf8_fallback()](https://developer.wordpress.org/reference/functions/_wp_is_valid_utf8_fallback/)
 * Fallback mechanism for safely validating UTF-8 bytes.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_is_valid_utf8_fallback/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_is_valid_utf8_fallback/#uses)
   | Source: [wp-includes/compat-utf8.php:258](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L258-L270)
 * function[_wp_scrub_utf8_fallback()](https://developer.wordpress.org/reference/functions/_wp_scrub_utf8_fallback/)
 * Fallback mechanism for replacing invalid spans of UTF-8 bytes.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_scrub_utf8_fallback/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_scrub_utf8_fallback/#uses)
   | Source: [wp-includes/compat-utf8.php:287](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/compat-utf8.php#L287-L313)