array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.recode-string.php', 1 => 'recode_string', ), 'up' => array ( 0 => 'ref.recode.php', 1 => 'Recode 関数', ), 'prev' => array ( 0 => 'function.recode-file.php', 1 => 'recode_file', ), 'next' => array ( 0 => 'function.recode.php', 1 => 'recode', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/recode/functions/recode-string.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7 < 7.4.0)
recode_string — コード変換指令に基づき文字列のコードを変換する
コード変換指令 request
に基づき文字列
string
のコードを変換します。
request
変換指令の型。
string
変換する文字列。
変換後の文字列、または変換指令を実行できない場合に false
を返します。
例1 基本的な recode_string() の例
<?php
echo recode_string("us..flat", "The following character has a diacritical mark: á");
?>
簡単なコード変換指令は、"lat1..iso646-de" のようになります。