PHP utf8_encode() Function

The utf8_encode() function encodes an ISO-8859-1 string to UTF-8.

string utf8_encode ( string $data )

This function converts the string data from the ISO-8859-1 encoding to UTF-8.

Unicode is a universal standard, and has been developed to describe all possible characters of all languages plus a lot of symbols with one unique number for each character/symbol.

However, it is not always possible to transfer a Unicode character to another computer reliably. UTF-8 has been developed to transfer a Unicode character from one computer to another .This function returns the encoded string on success, or FALSE on failure.

ParameterDescription
dataAn ISO-8859-1 string.

Return Values

Returns the UTF-8 translation of data.