php-doc-en/functions/recode.xml

121 lines
3.8 KiB
XML
Raw Normal View History

<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>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>recode_string</function></funcdef>
<paramdef>string <parameter>request</parameter></paramdef>
<paramdef>string <parameter>string</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Recode the string <parameter>string</parameter> according to
the recode request <parameter>request</parameter>. Returns
FALSE, if unable to comply, TRUE otherwise.
</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.
</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>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>recode_string</function></funcdef>
<paramdef>string <parameter>request</parameter></paramdef>
<paramdef>string <parameter>string</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<note>
<simpara>
This is an alias for <function>recode_string</function>. It has
been added in PHP4.
</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>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>recode_file</function></funcdef>
<paramdef>int <parameter>input</parameter></paramdef>
<paramdef>int <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.
</para>
<para>
This function does not currently process filehandles referencing
remote files (URLs). Both filehandles must refer to local files.
</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
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->