, , php UTF-8, , , UTF-8. , , ISO-8859-1, ISO-8859-1.
-, mb_detect_encoding . PHP UTF-8, UTF-8.
, ISO-8859-1, . , UTF-8, .
. , ISO-8859-1, iso-8859-1.php. iconv UTF-8 utf-8.php
iconv iso-8859-1.php --from iso-8859-1 --to UTF-8 > utf-8.php
, , mb_detect_encoding.
$ file iso-8859-1.php
iso-8859-1.php: PHP , ISO-8859 text
$ php iso-8859-1.php
ENCODING: UTF-8
DEBUG1 Le Courrier de S int-Hy cinthe
DEBUG2 LE COURRIER DE S?INT-HY?CINTHE
$ file utf-8.php
utf-8.php: PHP , UTF-8 Unicode text
$ php utf-8.php
ENCODING: UTF-8
DEBUG1 Le Courrier de Sáint-Hyácinthe
DEBUG2 LE COURRIER DE SÁINT-HYÁCINTHE
UTF-8, , ISO-8859-1, . , utf-8, utf-8.