File: recode.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (134 lines) | stat: -rw-r--r-- 4,628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="utf-8"?>
 <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">
print recode_string (&quot;us..flat&quot;, &quot;The following character has a diacritical mark: &amp;aacute;&quot;);
      </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_string</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>boolean</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">
$input = fopen ('input.txt', 'r');
$output = fopen ('output.txt', 'w');
recode_file (&quot;us..flat&quot;, $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:
-->