1--TEST--
2Test get_html_translation_table() function : basic functionality - charset WINDOWS-1252
3--FILE--
4<?php
5echo "*** Testing get_html_translation_table() : basic functionality/Windows-1252 ***\n";
6
7echo "-- with table = HTML_ENTITIES --\n";
8$table = HTML_ENTITIES;
9$tt = get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252");
10asort( $tt );
11var_dump( $tt );
12
13echo "-- with table = HTML_SPECIALCHARS --\n";
14$table = HTML_SPECIALCHARS;
15$tt = get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252");
16asort( $tt );
17var_dump( $tt );
18
19echo "Done\n";
20?>
21--EXPECT--
22*** Testing get_html_translation_table() : basic functionality/Windows-1252 ***
23-- with table = HTML_ENTITIES --
24array(125) {
25  ["�"]=>
26  string(7) "&AElig;"
27  ["�"]=>
28  string(8) "&Aacute;"
29  ["�"]=>
30  string(7) "&Acirc;"
31  ["�"]=>
32  string(8) "&Agrave;"
33  ["�"]=>
34  string(7) "&Aring;"
35  ["�"]=>
36  string(8) "&Atilde;"
37  ["�"]=>
38  string(6) "&Auml;"
39  ["�"]=>
40  string(8) "&Ccedil;"
41  ["�"]=>
42  string(8) "&Dagger;"
43  ["�"]=>
44  string(5) "&ETH;"
45  ["�"]=>
46  string(8) "&Eacute;"
47  ["�"]=>
48  string(7) "&Ecirc;"
49  ["�"]=>
50  string(8) "&Egrave;"
51  ["�"]=>
52  string(6) "&Euml;"
53  ["�"]=>
54  string(8) "&Iacute;"
55  ["�"]=>
56  string(7) "&Icirc;"
57  ["�"]=>
58  string(8) "&Igrave;"
59  ["�"]=>
60  string(6) "&Iuml;"
61  ["�"]=>
62  string(8) "&Ntilde;"
63  ["�"]=>
64  string(7) "&OElig;"
65  ["�"]=>
66  string(8) "&Oacute;"
67  ["�"]=>
68  string(7) "&Ocirc;"
69  ["�"]=>
70  string(8) "&Ograve;"
71  ["�"]=>
72  string(8) "&Oslash;"
73  ["�"]=>
74  string(8) "&Otilde;"
75  ["�"]=>
76  string(6) "&Ouml;"
77  ["�"]=>
78  string(8) "&Scaron;"
79  ["�"]=>
80  string(7) "&THORN;"
81  ["�"]=>
82  string(8) "&Uacute;"
83  ["�"]=>
84  string(7) "&Ucirc;"
85  ["�"]=>
86  string(8) "&Ugrave;"
87  ["�"]=>
88  string(6) "&Uuml;"
89  ["�"]=>
90  string(8) "&Yacute;"
91  ["�"]=>
92  string(6) "&Yuml;"
93  ["�"]=>
94  string(8) "&aacute;"
95  ["�"]=>
96  string(7) "&acirc;"
97  ["�"]=>
98  string(7) "&acute;"
99  ["�"]=>
100  string(7) "&aelig;"
101  ["�"]=>
102  string(8) "&agrave;"
103  ["&"]=>
104  string(5) "&amp;"
105  ["�"]=>
106  string(7) "&aring;"
107  ["�"]=>
108  string(8) "&atilde;"
109  ["�"]=>
110  string(6) "&auml;"
111  ["�"]=>
112  string(7) "&bdquo;"
113  ["�"]=>
114  string(8) "&brvbar;"
115  ["�"]=>
116  string(6) "&bull;"
117  ["�"]=>
118  string(8) "&ccedil;"
119  ["�"]=>
120  string(7) "&cedil;"
121  ["�"]=>
122  string(6) "&cent;"
123  ["�"]=>
124  string(6) "&circ;"
125  ["�"]=>
126  string(6) "&copy;"
127  ["�"]=>
128  string(8) "&curren;"
129  ["�"]=>
130  string(8) "&dagger;"
131  ["�"]=>
132  string(5) "&deg;"
133  ["�"]=>
134  string(8) "&divide;"
135  ["�"]=>
136  string(8) "&eacute;"
137  ["�"]=>
138  string(7) "&ecirc;"
139  ["�"]=>
140  string(8) "&egrave;"
141  ["�"]=>
142  string(5) "&eth;"
143  ["�"]=>
144  string(6) "&euml;"
145  ["�"]=>
146  string(6) "&euro;"
147  ["�"]=>
148  string(6) "&fnof;"
149  ["�"]=>
150  string(8) "&frac12;"
151  ["�"]=>
152  string(8) "&frac14;"
153  ["�"]=>
154  string(8) "&frac34;"
155  [">"]=>
156  string(4) "&gt;"
157  ["�"]=>
158  string(8) "&hellip;"
159  ["�"]=>
160  string(8) "&iacute;"
161  ["�"]=>
162  string(7) "&icirc;"
163  ["�"]=>
164  string(7) "&iexcl;"
165  ["�"]=>
166  string(8) "&igrave;"
167  ["�"]=>
168  string(8) "&iquest;"
169  ["�"]=>
170  string(6) "&iuml;"
171  ["�"]=>
172  string(7) "&laquo;"
173  ["�"]=>
174  string(7) "&ldquo;"
175  ["�"]=>
176  string(8) "&lsaquo;"
177  ["�"]=>
178  string(7) "&lsquo;"
179  ["<"]=>
180  string(4) "&lt;"
181  ["�"]=>
182  string(6) "&macr;"
183  ["�"]=>
184  string(7) "&mdash;"
185  ["�"]=>
186  string(7) "&micro;"
187  ["�"]=>
188  string(8) "&middot;"
189  ["�"]=>
190  string(6) "&nbsp;"
191  ["�"]=>
192  string(7) "&ndash;"
193  ["�"]=>
194  string(5) "&not;"
195  ["�"]=>
196  string(8) "&ntilde;"
197  ["�"]=>
198  string(8) "&oacute;"
199  ["�"]=>
200  string(7) "&ocirc;"
201  ["�"]=>
202  string(7) "&oelig;"
203  ["�"]=>
204  string(8) "&ograve;"
205  ["�"]=>
206  string(6) "&ordf;"
207  ["�"]=>
208  string(6) "&ordm;"
209  ["�"]=>
210  string(8) "&oslash;"
211  ["�"]=>
212  string(8) "&otilde;"
213  ["�"]=>
214  string(6) "&ouml;"
215  ["�"]=>
216  string(6) "&para;"
217  ["�"]=>
218  string(8) "&permil;"
219  ["�"]=>
220  string(8) "&plusmn;"
221  ["�"]=>
222  string(7) "&pound;"
223  ["""]=>
224  string(6) "&quot;"
225  ["�"]=>
226  string(7) "&raquo;"
227  ["�"]=>
228  string(7) "&rdquo;"
229  ["�"]=>
230  string(5) "&reg;"
231  ["�"]=>
232  string(8) "&rsaquo;"
233  ["�"]=>
234  string(7) "&rsquo;"
235  ["�"]=>
236  string(7) "&sbquo;"
237  ["�"]=>
238  string(8) "&scaron;"
239  ["�"]=>
240  string(6) "&sect;"
241  ["�"]=>
242  string(5) "&shy;"
243  ["�"]=>
244  string(6) "&sup1;"
245  ["�"]=>
246  string(6) "&sup2;"
247  ["�"]=>
248  string(6) "&sup3;"
249  ["�"]=>
250  string(7) "&szlig;"
251  ["�"]=>
252  string(7) "&thorn;"
253  ["�"]=>
254  string(7) "&tilde;"
255  ["�"]=>
256  string(7) "&times;"
257  ["�"]=>
258  string(7) "&trade;"
259  ["�"]=>
260  string(8) "&uacute;"
261  ["�"]=>
262  string(7) "&ucirc;"
263  ["�"]=>
264  string(8) "&ugrave;"
265  ["�"]=>
266  string(5) "&uml;"
267  ["�"]=>
268  string(6) "&uuml;"
269  ["�"]=>
270  string(8) "&yacute;"
271  ["�"]=>
272  string(5) "&yen;"
273  ["�"]=>
274  string(6) "&yuml;"
275}
276-- with table = HTML_SPECIALCHARS --
277array(4) {
278  ["&"]=>
279  string(5) "&amp;"
280  [">"]=>
281  string(4) "&gt;"
282  ["<"]=>
283  string(4) "&lt;"
284  ["""]=>
285  string(6) "&quot;"
286}
287Done
288