utf8_encode
(PHP 4, PHP 5, PHP 7)
utf8_encode — ISO-8859-1 文字列を UTF-8 にエンコードする
説明
utf8_encode
( string
$data
) : string
この関数は、文字列 data を ISO-8859-1
エンコードから UTF-8 へ変換します。
注意:
Many web pages marked as using the ISO-8859-1 character encoding actually use the similar Windows-1252 encoding, and web browsers will interpret ISO-8859-1 web pages as Windows-1252. Windows-1252 features additional printable characters, such as the Euro sign (?) and curly quotes (“ ”), instead of certain ISO-8859-1 control characters. This function will not convert such Windows-1252 characters correctly. Use a different function if Windows-1252 conversion is required.
パラメータ
-
data -
ISO-8859-1 形式の文字列。
返り値
data を UTF-8 に変換した結果を返します。
参考
- utf8_decode() - UTF-8 エンコードされた ISO-8859-1 文字列をシングルバイトの ISO-8859-1 に変換する - Performs the reverse conversion
- mb_convert_encoding() - 文字エンコーディングを変換する - Converts between various character encodings, including UTF-8, ISO-8859-1 and Windows-1252
- iconv() - 文字列を指定した文字エンコーディングに変換する - Converts between various character encodings
- recode_string() - コード変換指令に基づき文字列のコードを変換する - Converts between various character encodings