WordPress at a glance
function is not described

_wp_sanitize_utf8_in_redirect() WP 4.2.0

URL encode UTF-8 characters in a URL.

  • See: wp_sanitize_redirect()

This is a pluggable function, and it can be replaced by a plugin. It means that this function is defined (works) only after all plugins are loaded (included), but before this moment this function has not defined. Therefore, you cannot call this and all functions depended on this function directly from a plugin code. It must be called on plugins_loaded hook or later, for example on init hook.

Function replacement (override) — in a plugin you can create a function with the same name, then it replace this function.

No Hooks.

Return

String. URL-encoded version of the first RegEx match.

Usage

_wp_sanitize_utf8_in_redirect( $matches );
$matches(array) (required)
RegEx matches against the redirect location.

Code of wp sanitize utf8 in redirect: wp-includes/pluggable.php VER 5.1.1

<?php
function _wp_sanitize_utf8_in_redirect( $matches ) {
	return urlencode( $matches[0] );
}