utf8_encode()
Устарела. Больше не поддерживается и может быть удалена. Смотрите
{@see \mb_convert_encoding()}.Converts a string from ISO-8859-1 to UTF-8.
Хуков нет.
Возвращает
string. Text converted into a UTF-8.
Использование
utf8_encode( $iso_8859_1_text ): string;
- $iso_8859_1_text(строка) (обязательный)
- Text treated as ISO-8859-1 (latin1) bytes.
Список изменений
| С версии 6.9.0 | Введена. |
| Устарела | Use {@see \mb_convert_encoding()} instead. |
Код utf8_encode() utf8 encode WP 7.1.3
function utf8_encode( $iso_8859_1_text ): string {
_deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' );
return mb_convert_encoding( $iso_8859_1_text, 'UTF-8', 'ISO-8859-1' );
}
else :
/**
* @ignore
* @private
*
* @since 6.9.0
*/
function utf8_encode( $iso_8859_1_text ): string {
_deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' );
return _wp_utf8_encode_fallback( $iso_8859_1_text );
}