mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
iconv: small corrections
iconv_set_encoding: return type is bool, list possible types iconv_get_encoding: list of possible values for supplied type example added git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@95540 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0ebfcee884
commit
dc388c6551
3 changed files with 57 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/iconv.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.iconv-get-encoding">
|
||||
<refnamediv>
|
||||
|
@ -13,9 +13,48 @@
|
|||
<methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
It returns the current settings of
|
||||
<function>ob_iconv_handler</function> as array or
|
||||
&false; in failure.
|
||||
It returns the current settings of
|
||||
<function>ob_iconv_handler</function> as array or &false; on failure.
|
||||
The value of the optinal <parameter>type</parameter> can be:
|
||||
<simplelist>
|
||||
<member>all</member>
|
||||
<member>input_encoding</member>
|
||||
<member>output_encoding</member>
|
||||
<member>internal_encoding</member>
|
||||
</simplelist>
|
||||
If <parameter>type</parameter> is omitted or not 'all'
|
||||
<function>iconv_get_encoding</function> returns the current settings of
|
||||
<function>ob_iconv_handler</function> as string.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>iconv_get_encoding</function> example:</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<pre>
|
||||
<?php
|
||||
iconv_set_encoding("internal_encoding", "UTF-8");
|
||||
iconv_set_encoding("output_encoding", "ISO-8859-1");
|
||||
var_dump(iconv_get_encoding('all'));
|
||||
?>
|
||||
</pre>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The printout of the above program will be:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[input_encoding] => ISO-8859-1
|
||||
[output_encoding] => ISO-8859-1
|
||||
[internal_encoding] => UTF-8
|
||||
)
|
||||
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/iconv.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.iconv-set-encoding">
|
||||
<refnamediv>
|
||||
|
@ -9,14 +9,21 @@
|
|||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>iconv_set_encoding</methodname>
|
||||
<type>bool</type><methodname>iconv_set_encoding</methodname>
|
||||
<methodparam><type>string</type><parameter>type</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>charset</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
It changes the value of <parameter>type</parameter> to
|
||||
<parameter>charset</parameter> and returns &true; in success or
|
||||
&false; in failure.
|
||||
<parameter>charset</parameter>. &return.success;
|
||||
</para>
|
||||
<para>
|
||||
The value of <parameter>type</parameter> can be:
|
||||
<simplelist>
|
||||
<member>input_encoding</member>
|
||||
<member>output_encoding</member>
|
||||
<member>internal_encoding</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/iconv.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.iconv">
|
||||
<refnamediv>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
It converts the string <parameter>string</parameter> encoded in
|
||||
It converts the string <parameter>str</parameter> encoded in
|
||||
<parameter>in_charset</parameter> to the string encoded in
|
||||
<parameter>out_charset</parameter>. It returns the converted
|
||||
string or &false;, if it fails.
|
||||
|
@ -25,7 +25,7 @@
|
|||
<title><function>iconv</function> example:</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
echo iconv("ISO-8859-1","UTF-8","This is test.");
|
||||
echo iconv("ISO-8859-1","UTF-8","This is a test.");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue