Source of: /manual/en/function.unicode-set-subst-char.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.unicode.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.unicode-set-subst-char.php',
1 => 'unicode_set_subst_char',
),
'up' =>
array (
0 => 'ref.unicode.php',
1 => 'Unicode Functions',
),
'prev' =>
array (
0 => 'function.unicode-set-error-mode.php',
1 => 'unicode_set_error_mode',
),
'next' =>
array (
0 => 'refs.utilspec.image.php',
1 => 'Image Processing and Generation',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.unicode-set-subst-char" class="refentry">
<div class="refnamediv">
<h1 class="refname">unicode_set_subst_char</h1>
<p class="verinfo">(PHP 6 >= 6.0.0)</p><p class="refpurpose"><span class="refname">unicode_set_subst_char</span> — <span class="dc-title">Set the substitution character for string conversion errors</span></p>
</div>
<a name="function.unicode-set-subst-char.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">bool</span> <span class="methodname"><b>unicode_set_subst_char</b></span>
( <span class="methodparam"><span class="type"><span class="type unicode">unicode</span></span> <tt class="parameter">$character</tt></span>
)</div>
<p class="para rdfs-comment">
When converting a string from or to unicode, an invalid or unconvertible
character may be encountered. When the conversion error mode is set to
<b><tt class="constant">U_CONV_ERROR_SUBST</tt></b>, the character that caused the
error is substituted by a character set by this function. The default
substitution character is <i>?</i>.
</p>
</div>
<a name="function.unicode-set-subst-char.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">character</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The substitution character to use.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.unicode-set-subst-char.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns <b><tt class="constant">TRUE</tt></b> on success or <b><tt class="constant">FALSE</tt></b> on failure.
</p>
</div>
<a name="function.unicode-set-subst-char.errors"></a><div class="refsect1 errors">
<h3 class="title">Errors/Exceptions</h3>
<p class="para">
Emits a <b><tt class="constant">E_WARNING</tt></b> level error if
<i><tt class="parameter">character</tt></i>
is invalid.
</p>
</div>
<a name="function.unicode-set-subst-char.notes"></a><div class="refsect1 notes">
<h3 class="title">Notes</h3>
<div class="warning"><b class="warning">Warning</b><p class="simpara">This function is
<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, and
surrounding documentation may change without notice in a future release of PHP.
This function should be used at your own risk.
</p></div>
</div>
<a name="function.unicode-set-subst-char.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.unicode-set-error-mode.php" class="function" rel="rdfs-seeAlso">unicode_set_error_mode()</a> - Set the error mode for strings conversions</li>
<li class="member"><a href="function.unicode-get-error-mode.php" class="function" rel="rdfs-seeAlso">unicode_get_error_mode()</a> - Get the error mode for strings conversions</li>
<li class="member"><a href="function.unicode-encode.php" class="function" rel="rdfs-seeAlso">unicode_encode()</a> - Convert a unicode string in any encoding</li>
<li class="member"><a href="function.unicode-decode.php" class="function" rel="rdfs-seeAlso">unicode_decode()</a> - Convert a binary string into a Unicode string</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>