<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Convert string from one codepage to another</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.php-strip-whitespace.html">php_strip_whitespace</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sapi-windows-cp-get.html">sapi_windows_cp_get</a></div> <div class="up"><a href="ref.misc.html">Misc. Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.sapi-windows-cp-conv" class="refentry"> <div class="refnamediv"> <h1 class="refname">sapi_windows_cp_conv</h1> <p class="verinfo">(PHP 7 >= 7.1.0)</p><p class="refpurpose"><span class="refname">sapi_windows_cp_conv</span> — <span class="dc-title">Convert string from one codepage to another</span></p> </div> <div class="refsect1 description" id="refsect1-function.sapi-windows-cp-conv-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>sapi_windows_cp_conv</strong></span> ( <span class="methodparam"><span class="type"><span class="type int|string">int|string</span></span> <code class="parameter">$in_codepage</code></span> , <span class="methodparam"><span class="type"><span class="type int|string">int|string</span></span> <code class="parameter">$out_codepage</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$subject</code></span> )</div> <p class="para rdfs-comment"> Convert string from one codepage to another. </p> </div> <div class="refsect1 parameters" id="refsect1-function.sapi-windows-cp-conv-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">in_codepage</code></dt> <dd> <p class="para"> The codepage of the <code class="parameter">subject</code> string. Either the codepage name or identifier. </p> </dd> <dt> <code class="parameter">out_codepage</code></dt> <dd> <p class="para"> The codepage to convert the <code class="parameter">subject</code> string to. Either the codepage name or identifier. </p> </dd> <dt> <code class="parameter">subject</code></dt> <dd> <p class="para"> The string to convert. </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-function.sapi-windows-cp-conv-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> The <code class="parameter">subject</code> string converted to <code class="parameter">out_codepage</code>, or <strong><code>NULL</code></strong> on failure. </p> </div> <div class="refsect1 errors" id="refsect1-function.sapi-windows-cp-conv-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> This function issues E_WARNING level errors, if invalid codepages are given, or if the subject is not valid for <code class="parameter">in_codepage</code>. </p> </div> <div class="refsect1 seealso" id="refsect1-function.sapi-windows-cp-conv-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><span class="function"><a href="function.sapi-windows-cp-get.html" class="function" rel="rdfs-seeAlso">sapi_windows_cp_get()</a> - Get process codepage</span></li> <li class="member"><span class="function"><a href="function.iconv.html" class="function" rel="rdfs-seeAlso">iconv()</a> - Convert string to requested character encoding</span></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.php-strip-whitespace.html">php_strip_whitespace</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sapi-windows-cp-get.html">sapi_windows_cp_get</a></div> <div class="up"><a href="ref.misc.html">Misc. Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>