Page MenuHomePhorge

function phutil_utf8ize($string)
Arcanist Technical Documentation ()

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.