reference/xml/functions/utf8-decode.xml
99d758bd259fa80c2828cf8cc250984cb683ee8f
...
...
@@ -1,98 +0,0 @@
1
-
<?xml version="1.0" encoding="utf-8"?>
2
-
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.utf8-decode">
4
-
<refnamediv>
5
-
<refname>utf8_decode</refname>
6
-
<refpurpose>
7
-
Converts a string with ISO-8859-1 characters encoded with UTF-8
8
-
to single-byte ISO-8859-1
9
-
</refpurpose>
10
-
</refnamediv>
11
-
12
-
<refsect1 role="description">
13
-
&reftitle.description;
14
-
<methodsynopsis>
15
-
<type>string</type><methodname>utf8_decode</methodname>
16
-
<methodparam><type>string</type><parameter>data</parameter></methodparam>
17
-
</methodsynopsis>
18
-
<para>
19
-
This function converts the string <parameter>data</parameter> from the
20
-
<literal>UTF-8</literal> encoding to <literal>ISO-8859-1</literal>. Bytes
21
-
in the string which are not valid <literal>UTF-8</literal>, and
22
-
<literal>UTF-8</literal> characters which do not exist in
23
-
<literal>ISO-8859-1</literal> (that is, characters above
24
-
<literal>U+00FF</literal>) are replaced with <literal>?</literal>.
25
-
</para>
26
-
<note>
27
-
<para>
28
-
Many web pages marked as using the <literal>ISO-8859-1</literal> character
29
-
encoding actually use the similar <literal>Windows-1252</literal> encoding,
30
-
and web browsers will interpret <literal>ISO-8859-1</literal> web pages as
31
-
<literal>Windows-1252</literal>. <literal>Windows-1252</literal> features
32
-
additional printable characters, such as the Euro sign
33
-
(<literal>€</literal>) and curly quotes (<literal>“</literal>
34
-
<literal>”</literal>), instead of certain <literal>ISO-8859-1</literal>
35
-
control characters. This function will not convert such
36
-
<literal>Windows-1252</literal> characters correctly. Use a different
37
-
function if <literal>Windows-1252</literal> conversion is required.
38
-
</para>
39
-
</note>
40
-
</refsect1>
41
-

42
-
<refsect1 role="parameters">
43
-
&reftitle.parameters;
44
-
<para>
45
-
<variablelist>
46
-
<varlistentry>
47
-
<term><parameter>data</parameter></term>
48
-
<listitem>
49
-
<para>
50
-
A UTF-8 encoded string.
51
-
</para>
52
-
</listitem>
53
-
</varlistentry>
54
-
</variablelist>
55
-
</para>
56
-
</refsect1>
57
-

58
-
<refsect1 role="returnvalues">
59
-
&reftitle.returnvalues;
60
-
<para>
61
-
Returns the ISO-8859-1 translation of <parameter>data</parameter>.
62
-
</para>
63
-
</refsect1>
64
-

65
-
<refsect1 role="seealso">
66
-
&reftitle.seealso;
67
-
<para>
68
-
<simplelist>
69
-
<member><function>utf8_encode</function> - Performs the reverse conversion</member>
70
-
<member><function>mb_convert_encoding</function> - Converts between various character encodings, including UTF-8, ISO-8859-1 and Windows-1252</member>
71
-
<member><function>iconv</function> - Converts between various character encodings</member>
72
-
<member><function>recode_string</function> - Converts between various character encodings</member>
73
-
</simplelist>
74
-
</para>
75
-
</refsect1>
76
-

77
-
</refentry>
78
-

79
-
<!-- Keep this comment at the end of the file
80
-
Local variables:
81
-
mode: sgml
82
-
sgml-omittag:t
83
-
sgml-shorttag:t
84
-
sgml-minimize-attributes:nil
85
-
sgml-always-quote-attributes:t
86
-
sgml-indent-step:1
87
-
sgml-indent-data:t
88
-
indent-tabs-mode:nil
89
-
sgml-parent-document:nil
90
-
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
91
-
sgml-exposed-tags:nil
92
-
sgml-local-catalogs:nil
93
-
sgml-local-ecat-files:nil
94
-
End:
95
-
vim600: syn=xml fen fdm=syntax fdl=2 si
96
-
vim: et tw=78 syn=sgml
97
-
vi: ts=1 sw=1
98
-
-->
99
0