betz Wed Sep 11 19:17:19 2002 EDT
Modified files:
/phpdoc/en/reference/iconv/functions iconv-get-encoding.xml
iconv-set-encoding.xml
iconv.xml
Log:
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
Index: phpdoc/en/reference/iconv/functions/iconv-get-encoding.xml
diff -u phpdoc/en/reference/iconv/functions/iconv-get-encoding.xml:1.4
phpdoc/en/reference/iconv/functions/iconv-get-encoding.xml:1.5
--- phpdoc/en/reference/iconv/functions/iconv-get-encoding.xml:1.4 Thu Aug 22
17:19:55 2002
+++ phpdoc/en/reference/iconv/functions/iconv-get-encoding.xml Wed Sep 11 19:17:18
+2002
@@ -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:
Index: phpdoc/en/reference/iconv/functions/iconv-set-encoding.xml
diff -u phpdoc/en/reference/iconv/functions/iconv-set-encoding.xml:1.4
phpdoc/en/reference/iconv/functions/iconv-set-encoding.xml:1.5
--- phpdoc/en/reference/iconv/functions/iconv-set-encoding.xml:1.4 Thu Aug 22
17:19:55 2002
+++ phpdoc/en/reference/iconv/functions/iconv-set-encoding.xml Wed Sep 11 19:17:19
+2002
@@ -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>
Index: phpdoc/en/reference/iconv/functions/iconv.xml
diff -u phpdoc/en/reference/iconv/functions/iconv.xml:1.4
phpdoc/en/reference/iconv/functions/iconv.xml:1.5
--- phpdoc/en/reference/iconv/functions/iconv.xml:1.4 Thu Aug 22 17:19:55 2002
+++ phpdoc/en/reference/iconv/functions/iconv.xml Wed Sep 11 19:17:19 2002
@@ -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>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php