cvs: phpdoc /en/functions recode.xml
| From: | Zak Greant | Date: | Fri, 10 Nov 2000 06:02:49 +0000 |
| Subject: | cvs: phpdoc /en/functions recode.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969332855@lists.php.net to get a copy of this message | ||
zak Thu Nov 9 22:02:49 2000 EDT
Modified files:
/phpdoc/en/functions recode.xml
Log:
Corrected error in recode_file prototype
Added examples for recode_string and recode_file
Index: phpdoc/en/functions/recode.xml
diff -u phpdoc/en/functions/recode.xml:1.6 phpdoc/en/functions/recode.xml:1.7
--- phpdoc/en/functions/recode.xml:1.6 Fri Sep 15 09:09:43 2000
+++ phpdoc/en/functions/recode.xml Thu Nov 9 22:02:49 2000
@@ -36,13 +36,19 @@
</funcsynopsis>
<para>
Recode the string <parameter>string</parameter> according to
- the recode request <parameter>request</parameter>. Returns
- FALSE, if unable to comply, TRUE otherwise.
+ the recode request <parameter>request</parameter>. Returns the
+ recoded string or FALSE, if unable to perform the recode request.
</para>
<para>
A simple recode request may be "lat1..iso646-de".
See also the GNU Recode documentation of your installation
for detailed instructions about recode requests.
+ <example>
+ <title>Basic <function>recode_string</function> example:</title>
+ <programlisting role="php">
+print recode_string ("us..flat", "The following character has a
diacritical mark: &aacute;");
+ </programlisting>
+ </example>
</para>
</refsect1>
</refentry>
@@ -81,21 +87,32 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>bool <function>recode_file</function></funcdef>
- <paramdef>int <parameter>input</parameter></paramdef>
- <paramdef>int <parameter>output</parameter></paramdef>
+ <funcdef>boolean <function>recode_file</function></funcdef>
+ <paramdef>string <parameter>request</parameter></paramdef>
+ <paramdef>resource <parameter>input</parameter></paramdef>
+ <paramdef>resource <parameter>output</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Recode the file referenced by file handle
<parameter>input</parameter> into the file referenced by file
handle <parameter>output</parameter> according to the recode
- request. Returns FALSE, if unable to comply, TRUE
- otherwise.
+ <parameter>request</parameter>. Returns FALSE, if unable to
+ comply, TRUE otherwise.
</para>
<para>
This function does not currently process filehandles referencing
remote files (URLs). Both filehandles must refer to local files.
+ </para>
+ <para>
+ <example>
+ <title>Basic <function>recode_file</function> example</title>
+ <programlisting role="php">
+$input = fopen ('input.txt', 'r');
+$output = fopen ('output.txt', 'w');
+recode_file ("us..flat", $input, $output);
+ </programlisting>
+ </example>
</para>
</refsect1>
</refentry>