php-doc-en/functions/recode.xml
Hartmut Holzgraefe 7839d91186 added DO NOT EDIT noctice to old english functions files,
removing the others


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78562 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 19:58:46 +00:00

151 lines
4.9 KiB
XML

<!-- D O N O T E D I T T H I S F I L E ! ! !
it is still here for historical reasons only
(as translators may need to check old revision diffs)
if you want to change things documented in this file
you should now edit the files found under en/reference
instead -->
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.19 $ -->
<reference id="ref.recode">
<title>GNU Recode functions</title>
<titleabbrev>Recode</titleabbrev>
<partintro>
<para>
This module contains an interface to the GNU Recode library,
version 3.5. To be able to use the functions defined in this
module you must compile you PHP interpreter using the --with-recode
option. In order to do so, you must have GNU Recode 3.5 or higher
installed on your system.
</para>
<para>
The GNU Recode library converts files between various coded
character sets and surface encodings. When this cannot be
achieved exactly, it may get rid of the offending characters or
fall back on approximations. The library recognises or produces
nearly 150 different character sets and is able to convert files
between almost any pair. Most RFC 1345 character sets are supported.
</para>
</partintro>
<refentry id="function.recode-string">
<refnamediv>
<refname>recode_string</refname>
<refpurpose>Recode a string according to a recode request</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>recode_string</methodname>
<methodparam><type>string</type><parameter>request</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
</methodsynopsis>
<para>
Recode the string <parameter>string</parameter> according to
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 &quot;lat1..iso646-de&quot;.
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">
<![CDATA[
print recode_string ("us..flat", "The following character has a diacritical mark: &aacute;");
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.recode">
<refnamediv>
<refname>recode</refname>
<refpurpose>Recode a string according to a recode request</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>recode</methodname>
<methodparam><type>string</type><parameter>request</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
</methodsynopsis>
<note>
<simpara>
This is an alias for <function>recode_string</function>. It has
been added in PHP 4.
</simpara>
</note>
</refsect1>
</refentry>
<refentry id="function.recode-file">
<refnamediv>
<refname>recode_file</refname>
<refpurpose>
Recode from file to file according to recode request
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>recode_file</methodname>
<methodparam><type>string</type><parameter>request</parameter></methodparam>
<methodparam><type>resource</type><parameter>input</parameter></methodparam>
<methodparam><type>resource</type><parameter>output</parameter></methodparam>
</methodsynopsis>
<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
<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">
<![CDATA[
$input = fopen ('input.txt', 'r');
$output = fopen ('output.txt', 'w');
recode_file ("us..flat", $input, $output);
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->