reference/mbstring/functions/mb-encode-mimeheader.xml
936691e7449fe193b474f7d29df152952e9b8df6
...
...
@@ -10,15 +10,15 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>mb_encode_mimeheader</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>charset</parameter><initializer>determined by mb_language()</initializer></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>transfer_encoding</parameter><initializer>&quot;B&quot;</initializer></methodparam>
16
-
<methodparam choice="opt"><type>string</type><parameter>linefeed</parameter><initializer>&quot;\r\n&quot;</initializer></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>charset</parameter><initializer>&null;</initializer></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>transfer_encoding</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type>string</type><parameter>newline</parameter><initializer>"\r\n"</initializer></methodparam>
17
17
<methodparam choice="opt"><type>int</type><parameter>indent</parameter><initializer>0</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Encodes a given <type>string</type>
21
-
<parameter>str</parameter> by the MIME header encoding scheme.
21
+
<parameter>string</parameter> by the MIME header encoding scheme.
22
22
</para>
23
23
</refsect1>
24
24

...
...
@@ -27,7 +27,7 @@
27
27
<para>
28
28
<variablelist>
29
29
<varlistentry>
30
-
<term><parameter>str</parameter></term>
30
+
<term><parameter>string</parameter></term>
31
31
<listitem>
32
32
<para>
33
33
The <type>string</type> being encoded.
...
...
@@ -40,7 +40,7 @@
40
40
<listitem>
41
41
<para>
42
42
<parameter>charset</parameter> specifies the name of the character set
43
-
in which <parameter>str</parameter> is represented in. The default value
43
+
in which <parameter>string</parameter> is represented in. The default value
44
44
is determined by the current NLS setting (<literal>mbstring.language</literal>).
45
45
</para>
46
46
</listitem>
...
...
@@ -57,10 +57,10 @@
57
57
</listitem>
58
58
</varlistentry>
59
59
<varlistentry>
60
-
<term><parameter>linefeed</parameter></term>
60
+
<term><parameter>newline</parameter></term>
61
61
<listitem>
62
62
<para>
63
-
<parameter>linefeed</parameter> specifies the EOL (end-of-line) marker
63
+
<parameter>newline</parameter> specifies the EOL (end-of-line) marker
64
64
with which <function>mb_encode_mimeheader</function> performs
65
65
line-folding (a <link xlink:href="&url.rfc;2822">RFC</link> term,
66
66
the act of breaking a line longer than a certain length into multiple
...
...
@@ -74,7 +74,7 @@
74
74
<listitem>
75
75
<para>
76
76
Indentation of the first line (number of characters in the header
77
-
before <parameter>str</parameter>).
77
+
before <parameter>string</parameter>).
78
78
</para>
79
79
</listitem>
80
80
</varlistentry>
...
...
@@ -89,6 +89,29 @@
89
89
</para>
90
90
</refsect1>
91
91

92
+
<refsect1 role="changelog">
93
+
&reftitle.changelog;
94
+
<informaltable>
95
+
<tgroup cols="2">
96
+
<thead>
97
+
<row>
98
+
<entry>&Version;</entry>
99
+
<entry>&Description;</entry>
100
+
</row>
101
+
</thead>
102
+
<tbody>
103
+
<row>
104
+
<entry>8.0.0</entry>
105
+
<entry>
106
+
<parameter>charset</parameter> and <parameter>transfer_encoding</parameter>
107
+
are nullable now.
108
+
</entry>
109
+
</row>
110
+
</tbody>
111
+
</tgroup>
112
+
</informaltable>
113
+
</refsect1>
114
+

92
115
<refsect1 role="examples">
93
116
&reftitle.examples;
94
117
<para>
...
...
@@ -97,14 +120,20 @@
97
120
<programlisting role="php">
98
121
<![CDATA[
99
122
<?php
100
-
$name = ""; // kanji
123
+
$name = "太郎"; // kanji
101
124
$mbox = "kru";
102
125
$doma = "gtinn.mon";
103
-
$addr = mb_encode_mimeheader($name, "UTF-7", "Q") . " <" . $mbox . "@" . $doma . ">";
126
+
$addr = '"' . addcslashes(mb_encode_mimeheader($name, "UTF-7", "Q"), '"') . '" <' . $mbox . "@" . $doma . ">";
104
127
echo $addr;
105
128
?>
106
129
]]>
107
130
</programlisting>
131
+
&example.outputs;
132
+
<screen>
133
+
<![CDATA[
134
+
"=?UTF-7?Q?+WSqQzg-?=" <kru@gtinn.mon>
135
+
]]>
136
+
</screen>
108
137
</example>
109
138
</para>
110
139
</refsect1>
...
...
@@ -130,7 +159,6 @@ echo $addr;
130
159
</refsect1>
131
160

132
161
</refentry>
133
-

134
162
<!-- Keep this comment at the end of the file
135
163
Local variables:
136
164
mode: sgml
137
165