<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.recode.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.recode-string.php',
    1 => 'recode_string',
    2 => 'Recode a string according to a recode request',
  ),
  'up' => 
  array (
    0 => 'ref.recode.php',
    1 => 'Recode 函数',
  ),
  'prev' => 
  array (
    0 => 'function.recode-file.php',
    1 => 'recode_file',
  ),
  'next' => 
  array (
    0 => 'refs.utilspec.image.php',
    1 => '图像生成和处理',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/recode/functions/recode-string.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.recode-string" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">recode_string</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7 &lt; 7.4.0)</p><p class="refpurpose"><span class="refname">recode_string</span> &mdash; <span class="dc-title">Recode a string according to a recode request</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.recode-string-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>recode_string</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$request</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="simpara">
   Recode the string <code class="parameter">string</code> according to
   the recode request <code class="parameter">request</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.recode-string-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">request</code></dt>
    <dd>
     <span class="simpara">
      The desired recode request type
     </span>
    </dd>
   
   
    <dt><code class="parameter">string</code></dt>
    <dd>
     <span class="simpara">
      The <span class="type"><a href="language.types.string.php" class="type string">string</a></span> to be recoded
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.recode-string-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Returns the recoded <span class="type"><a href="language.types.string.php" class="type string">string</a></span> or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, if unable to
   perform the recode request.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.recode-string-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-1">
   <p><strong>示例 #1 Basic <span class="function"><strong>recode_string()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">recode_string</span><span style="color: #007700">(</span><span style="color: #DD0000">"us..flat"</span><span style="color: #007700">, </span><span style="color: #DD0000">"The following character has a diacritical mark: á"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.recode-string-notes">
  <h3 class="title">注释</h3>
   <p class="simpara">
    A simple recode request may be &quot;lat1..iso646-de&quot;.
   </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.recode-string-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li>
    The GNU Recode documentation of your installation for detailed
    instructions about recode requests.
   </li>
   <li><span class="function"><a href="function.mb-convert-encoding.php" class="function" rel="rdfs-seeAlso">mb_convert_encoding()</a> - 转换字符串，从一个字符编码到另一个字符编码</span></li>
   <li><span class="methodname"><a href="uconverter.transcode.php" class="methodname" rel="rdfs-seeAlso">UConverter::transcode()</a> - Convert a string from one character encoding to another</span></li>
   <li><span class="function"><a href="function.iconv.php" class="function" rel="rdfs-seeAlso">iconv()</a> - 将字符串从一个字符编码转换到另一个字符编码</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>