Page MenuHomePhorge

function phutil_utf8ize($string)
libphutil Technical Documentation (Core Utilities)

Convert a string into valid UTF-8. This function is quite slow.

When invalid byte subsequences are encountered, they will be replaced with U+FFFD, the Unicode replacement character.

This function treats overlong encodings as invalid.

Parameters
string$stringString to convert to valid UTF-8.
Return
stringString with invalid UTF-8 byte subsequences replaced with U+FFFD.