reference/xml/functions/utf8-encode.xml
99d758bd259fa80c2828cf8cc250984cb683ee8f
...
...
@@ -1,109 +0,0 @@
1
-
<?xml version="1.0" encoding="utf-8"?>
2
-
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.utf8-encode">
4
-
<refnamediv>
5
-
<refname>utf8_encode</refname>
6
-
<refpurpose>Encodes an ISO-8859-1 string to UTF-8</refpurpose>
7
-
</refnamediv>
8
-
9
-
<refsect1 role="description">
10
-
&reftitle.description;
11
-
<methodsynopsis>
12
-
<type>string</type><methodname>utf8_encode</methodname>
13
-
<methodparam><type>string</type><parameter>data</parameter></methodparam>
14
-
</methodsynopsis>
15
-
<para>
16
-
This function encodes the string <parameter>data</parameter> to
17
-
<literal>UTF-8</literal>, and returns the encoded version.
18
-
<literal>UTF-8</literal> is a standard mechanism used by
19
-
<acronym>Unicode</acronym> for encoding <glossterm>wide
20
-
character</glossterm> values into a byte stream.
21
-
<literal>UTF-8</literal> is transparent to plain <abbrev>ASCII</abbrev>
22
-
characters, is self-synchronized (meaning it is possible for a program to
23
-
figure out where in the bytestream characters start) and can be used with
24
-
normal string comparison functions for sorting and such. PHP encodes
25
-
<literal>UTF-8</literal> characters in up to four bytes, like this:
26
-
<table>
27
-
<title>UTF-8 encoding</title>
28
-
<tgroup cols="3">
29
-
<thead>
30
-
<row>
31
-
<entry>bytes</entry>
32
-
<entry>bits</entry>
33
-
<entry>representation</entry>
34
-
</row>
35
-
</thead>
36
-
<tbody>
37
-
<row>
38
-
<entry>1</entry>
39
-
<entry>7</entry>
40
-
<entry>0bbbbbbb</entry>
41
-
</row>
42
-
<row>
43
-
<entry>2</entry>
44
-
<entry>11</entry>
45
-
<entry>110bbbbb 10bbbbbb</entry>
46
-
</row>
47
-
<row>
48
-
<entry>3</entry>
49
-
<entry>16</entry>
50
-
<entry>1110bbbb 10bbbbbb 10bbbbbb</entry>
51
-
</row>
52
-
<row>
53
-
<entry>4</entry>
54
-
<entry>21</entry>
55
-
<entry>11110bbb 10bbbbbb 10bbbbbb 10bbbbbb</entry>
56
-
</row>
57
-
</tbody>
58
-
</tgroup>
59
-
</table>
60
-
Each <replaceable>b</replaceable> represents a bit that can be
61
-
used to store character data.
62
-
</para>
63
-
</refsect1>
64
-

65
-
<refsect1 role="parameters">
66
-
&reftitle.parameters;
67
-
<para>
68
-
<variablelist>
69
-
<varlistentry>
70
-
<term><parameter>data</parameter></term>
71
-
<listitem>
72
-
<para>
73
-
An ISO-8859-1 string.
74
-
</para>
75
-
</listitem>
76
-
</varlistentry>
77
-
</variablelist>
78
-
</para>
79
-
</refsect1>
80
-

81
-
<refsect1 role="returnvalues">
82
-
&reftitle.returnvalues;
83
-
<para>
84
-
Returns the UTF-8 translation of <parameter>data</parameter>.
85
-
</para>
86
-
</refsect1>
87
-

88
-
</refentry>
89
-

90
-
<!-- Keep this comment at the end of the file
91
-
Local variables:
92
-
mode: sgml
93
-
sgml-omittag:t
94
-
sgml-shorttag:t
95
-
sgml-minimize-attributes:nil
96
-
sgml-always-quote-attributes:t
97
-
sgml-indent-step:1
98
-
sgml-indent-data:t
99
-
indent-tabs-mode:nil
100
-
sgml-parent-document:nil
101
-
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
102
-
sgml-exposed-tags:nil
103
-
sgml-local-catalogs:nil
104
-
sgml-local-ecat-files:nil
105
-
End:
106
-
vim600: syn=xml fen fdm=syntax fdl=2 si
107
-
vim: et tw=78 syn=sgml
108
-
vi: ts=1 sw=1
109
-
-->
110
0