File: iconv.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 (188 lines) | stat: -rw-r--r-- 5,780 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
 <reference id="ref.iconv">
  <title>iconv functions</title>
  <titleabbrev>iconv</titleabbrev>

  <partintro>
   <para>
    This module contains an interface to the iconv library functions. To 
    be able to use the functions defined in this
    module you must compile you PHP interpreter using the --with-iconv
    option. In order to do so, you must have iconv() function in 
    standard C library or libiconv installed on your system.
    libiconv library is available from <ulink url="&url.libiconv;">
     &url.libiconv;</ulink>.
   </para>

   <para>
    iconv library function converts files between various encoded 
    character sets. The supported character sets depend on iconv() 
    implementation on your system. Note that iconv() function in some
    system is not work well as you expect. In this case, you should
    install libiconv library.
   </para>
  </partintro>

  <refentry id="function.iconv">
   <refnamediv>
    <refname>iconv</refname>
    <refpurpose>Convert string to requested character encoding</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>iconv</methodname>
      <methodparam><type>string</type><parameter>in_charset</parameter></methodparam>
      <methodparam><type>string</type><parameter>out_charset</parameter></methodparam>
      <methodparam><type>string</type><parameter>str</parameter></methodparam>
     </methodsynopsis>
    <para>
     It converts the string <parameter>string</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.
    </para>
    <para>
     <example>
      <title><function>iconv</function> example:</title>
      <programlisting role="php">
<![CDATA[
echo iconv("ISO-8859-1","UTF-8","This is test.");
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.iconv-get-encoding">
   <refnamediv>
    <refname>iconv_get_encoding</refname>
    <refpurpose>
     Get current setting for character encoding conversion
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>iconv_get_encoding</methodname>
      <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.
    </para>
    <para>
     See also: 
     <function>iconv_set_encoding</function> and
     <function>ob_iconv_handler</function>.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.iconv-set-encoding">
   <refnamediv>
    <refname>iconv_set_encoding</refname>
    <refpurpose>
     Set current setting for character encoding conversion
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</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.
    </para>
    <para>
     <example>
      <title><function>iconv_set_encoding</function> example:</title>
      <programlisting role="php">
<![CDATA[
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "ISO-8859-1");
]]>
      </programlisting>
     </example>
    </para>
    <para>
     See also: 
     <function>iconv_get_encoding</function> and
     <function>ob_iconv_handler</function>.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ob-iconv-handler">
   <refnamediv>
    <refname>ob_iconv_handler</refname>
    <refpurpose>
     Convert character encoding as output buffer handler
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>ob_iconv_handler</methodname>
      <methodparam><type>string</type><parameter>contents</parameter></methodparam>
      <methodparam><type>int</type><parameter>status</parameter></methodparam>
     </methodsynopsis>
    <para>
     It converts the string encoded in 
     <parameter>internal_encoding</parameter> to
     <parameter>output_encoding</parameter>.
    </para>
    <para>
     <parameter>internal_encoding</parameter> and
     <parameter>output_encoding</parameter> should be defined
     by <function>iconv_set_encoding</function> or in 
     configuration file.
    </para>
    <para>
     <example>
      <title><function>ob_iconv_handler</function> example:</title>
      <programlisting role="php">
<![CDATA[
ob_start("ob_iconv_handler"); // start output buffering
]]>
      </programlisting>
     </example>
    </para>
    <para>
     See also: 
     <function>iconv_get_encoding</function> and
     <function>iconv_set_encoding</function>.
    </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
-->