-
Notifications
You must be signed in to change notification settings - Fork 0
/
html_entities.php
555 lines (540 loc) · 23.1 KB
/
html_entities.php
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<?
$html_num_entities = array(
" " => " ", # non-breaking space
"¡" => "¡", # inverted exclamation mark
"¢" => "¢", # cent sign
"£" => "£", # pound sign
"¤" => "¤", # currency sign
"¥" => "¥", # yen sign
"¦" => "¦", # broken bar
"§" => "§", # section sign
"¨" => "¨", # diaeresis
"©" => "©", # copyright sign
"ª" => "ª", # feminine ordinal indicator
"«" => "«", # left-pointing double angle quotation mark
"¬" => "¬", # not sign
"­" => "", # soft hyphen
"®" => "®", # registered sign
"¯" => "¯", # macron
"°" => "°", # degree sign
"±" => "±", # plus-minus sign
"²" => "²", # superscript two
"³" => "³", # superscript three
"´" => "´", # acute accent
"µ" => "µ", # micro sign
"¶" => "¶", # pilcrow sign
"·" => "·", # middle dot
"¸" => "¸", # cedilla
"¹" => "¹", # superscript one
"º" => "º", # masculine ordinal indicator
"»" => "»", # right-pointing double angle quotation mark
"¼" => "¼", # vulgar fraction one quarter
"½" => "½", # vulgar fraction one half
"¾" => "¾", # vulgar fraction three quarters
"¿" => "¿", # inverted question mark
"À" => "À", # latin capital letter A with grave
"Á" => "Á", # latin capital letter A with acute
"Â" => "Â", # latin capital letter A with circumflex
"Ã" => "Ã", # latin capital letter A with tilde
"Ä" => "Ä", # latin capital letter A with diaeresis
"Å" => "Å", # latin capital letter A with ring above
"Æ" => "Æ", # latin capital letter AE
"Ç" => "Ç", # latin capital letter C with cedilla
"È" => "È", # latin capital letter E with grave
"É" => "É", # latin capital letter E with acute
"Ê" => "Ê", # latin capital letter E with circumflex
"Ë" => "Ë", # latin capital letter E with diaeresis
"Ì" => "Ì", # latin capital letter I with grave
"Í" => "Í", # latin capital letter I with acute
"Î" => "Î", # latin capital letter I with circumflex
"Ï" => "Ï", # latin capital letter I with diaeresis
"Ð" => "Ð", # latin capital letter ETH
"Ñ" => "Ñ", # latin capital letter N with tilde
"Ò" => "Ò", # latin capital letter O with grave
"Ó" => "Ó", # latin capital letter O with acute
"Ô" => "Ô", # latin capital letter O with circumflex
"Õ" => "Õ", # latin capital letter O with tilde
"Ö" => "Ö", # latin capital letter O with diaeresis
"×" => "×", # multiplication sign
"Ø" => "Ø", # latin capital letter O with stroke
"Ù" => "Ù", # latin capital letter U with grave
"Ú" => "Ú", # latin capital letter U with acute
"Û" => "Û", # latin capital letter U with circumflex
"Ü" => "Ü", # latin capital letter U with diaeresis
"Ý" => "Ý", # latin capital letter Y with acute
"Þ" => "Þ", # latin capital letter THORN
"ß " => "ß", # latin small letter sharp s
"à" => "à", # latin small letter a with grave
"á" => "á", # latin small letter a with acute
"â" => "â", # latin small letter a with circumflex
"ã" => "ã", # latin small letter a with tilde
"ä" => "ä", # latin small letter a with diaeresis
"å" => "å", # latin small letter a with ring above
"æ" => "æ", # latin small letter ae
"ç" => "ç", # latin small letter c with cedilla
"è" => "è", # latin small letter e with grave
"é" => "é", # latin small letter e with acute
"ê" => "ê", # latin small letter e with circumflex
"ë" => "ë", # latin small letter e with diaeresis
"ì" => "ì", # latin small letter i with grave
"í" => "í", # latin small letter i with acute
"î" => "î", # latin small letter i with circumflex
"ï" => "ï", # latin small letter i with diaeresis
"ð" => "ð", # latin small letter eth
"ñ" => "ñ", # latin small letter n with tilde
"ò" => "ò", # latin small letter o with grave
"ó" => "ó", # latin small letter o with acute
"ô" => "ô", # latin small letter o with circumflex
"õ" => "õ", # latin small letter o with tilde
"ö" => "ö", # latin small letter o with diaeresis
"÷" => "÷", # division sign
"ø" => "ø", # latin small letter o with stroke
"ù" => "ù", # latin small letter u with grave
"ú" => "ú", # latin small letter u with acute
"û" => "û", # latin small letter u with circumflex
"ü" => "ü", # latin small letter u with diaeresis
"ý" => "ý", # latin small letter y with acute
"þ" => "þ", # latin small letter thorn
"ÿ" => "ÿ", # latin small letter y with diaeresis
"Œ" => "Œ", # latin capital ligature OE
"œ" => "œ", # latin small ligature oe
""" => "\"", # quotation mark
"Š" => "Š", # latin capital letter S with caron
"š" => "š", # latin small letter s with caron
"Ÿ" => "Ÿ", # latin capital letter Y with diaeresis
"&" => "&", # ampersand
"ƒ" => "ƒ", # latin small f with hook
"<" => "<", # less-than sign
">" => ">", # greater-than sign
"ˆ" => "ˆ", # modifier letter circumflex accent
"˜" => "˜", # small tilde
" " => " ", # en space
" " => " ", # em space
" " => " ", # thin space
"‌" => "", # zero width non-joiner
"‍" => "", # zero width joiner
"–" => "–", # en dash
"—" => "—", # em dash
"‘" => "‘", # left single quotation mark
"’" => "’", # right single quotation mark
"‚" => "‚", # single low-9 quotation mark
"“" => "“", # left double quotation mark
"”" => "”", # right double quotation mark
"„" => "„", # double low-9 quotation mark
"†" => "†", # dagger
"‡" => "‡", # double dagger
"•" => "•", # bullet
"…" => "…", # horizontal ellipsis
"‰" => "‰", # per mille sign
"′" => "′", # primeminutes
"″" => "″", # double prime
"‹" => "‹", # single left-pointing angle quotation mark
"›" => "›", # single right-pointing angle quotation mark
"‾" => "‾", # overline
"⁄" => "⁄", # fraction slash
"€" => "€", # euro sign
"ℑ" => "ℑ", # blackletter capital I
"℘" => "℘", # script capital P
"ℜ" => "ℜ", # blackletter capital R
"™" => "™", # trade mark sign
"ℵ" => "ℵ", # alef symbol
"←" => "←", # leftwards arrow
"↑" => "↑", # upwards arrow
"→" => "→", # rightwards arrow
"↓" => "↓", # downwards arrow
"↔" => "↔", # left right arrow
"↵" => "↵", # downwards arrow with corner leftwards
"⇐" => "⇐", # leftwards double arrow
"⇑" => "⇑", # upwards double arrow
"⇒" => "⇒", # rightwards double arrow
"⇓" => "⇓", # downwards double arrow
"⇔" => "⇔", # left right double arrow
"∀" => "∀", # for all
"∂" => "∂", # partial differential
"∃" => "∃", # there exists
"∅" => "∅", # empty set
"∇" => "∇", # nabla
"∈" => "∈", # element of
"∉" => "∉", # not an element of
"∋" => "∋", # contains as member
"∏" => "∏", # n-ary product
"∑" => "∑", # n-ary sumation
"−" => "−", # minus sign
"∗" => "∗", # asterisk operator
"√" => "√", # square root
"∝" => "∝", # proportional to
"∞" => "∞", # infinity
"∠" => "∠", # angle
"∧" => "∧", # logical and
"∨" => "∨", # logical or
"∩" => "∩", # intersection
"∪" => "∪", # union
"∫" => "∫", # integral
"∴" => "∴", # therefore
"∼" => "∼", # tilde operator
"≅" => "≅", # approximately equal to
"≈" => "≈", # almost equal to
"≠" => "≠", # not equal to
"≡" => "≡", # identical to
"≤" => "≤", # less-than or equal to
"≥" => "≥", # greater-than or equal to
"⊂" => "⊂", # subset of
"⊃" => "⊃", # superset of
"⊄" => "⊄", # not a subset of
"⊆" => "⊆", # subset of or equal to
"⊇" => "⊇", # superset of or equal to
"⊕" => "⊕", # circled plus
"⊗" => "⊗", # circled times
"⊥" => "⊥", # up tack
"⋅" => "⋅", # dot operator
"⌈" => "⌈", # left ceiling
"⌉" => "⌉", # right ceiling
"⌊" => "⌊", # left floor
"⌋" => "⌋", # right floor
"〈" => "〈", # left-pointing angle bracket
"〉" => "〉", # right-pointing angle bracket
"Α" => "Α", # greek capital letter alpha
"Β" => "Β", # greek capital letter beta
"Γ" => "Γ", # greek capital letter gamma
"Δ" => "Δ", # greek capital letter delta
"Ε" => "Ε", # greek capital letter epsilon
"Ζ" => "Ζ", # greek capital letter zeta
"Η" => "Η", # greek capital letter eta
"Θ" => "Θ", # greek capital letter theta
"Ι" => "Ι", # greek capital letter iota
"Κ" => "Κ", # greek capital letter kappa
"Λ" => "Λ", # greek capital letter lambda
"Μ" => "Μ", # greek capital letter mu
"Ν" => "Ν", # greek capital letter nu
"Ξ" => "Ξ", # greek capital letter xi
"Ο" => "Ο", # greek capital letter omicron
"Π" => "Π", # greek capital letter pi
"Ρ" => "Ρ", # greek capital letter rho
"Σ" => "Σ", # greek capital letter sigma
"Τ" => "Τ", # greek capital letter tau
"Υ" => "Υ", # greek capital letter upsilon
"Φ" => "Φ", # greek capital letter phi
"Χ" => "Χ", # greek capital letter chi
"Ψ" => "Ψ", # greek capital letter psi
"Ω" => "Ω", # greek capital letter omega
"α" => "α", # greek small letter alpha
"β" => "β", # greek small letter beta
"γ" => "γ", # greek small letter gamma
"δ" => "δ", # greek small letter delta
"ε" => "ε", # greek small letter epsilon
"ζ" => "ζ", # greek small letter zeta
"η" => "η", # greek small letter eta
"θ" => "θ", # greek small letter theta
"ι" => "ι", # greek small letter iota
"κ" => "κ", # greek small letter kappa
"λ" => "λ", # greek small letter lambda
"μ" => "μ", # greek small letter mu
"ν" => "ν", # greek small letter nu
"ξ" => "ξ", # greek small letter xi
"ο" => "ο", # greek small letter omicron
"π" => "π", # greek small letter pi
"ρ" => "ρ", # greek small letter rho
"ς" => "ς", # greek small letter final sigma
"σ" => "σ", # greek small letter sigma
"τ" => "τ", # greek small letter tau
"υ" => "υ", # greek small letter upsilon
"φ" => "φ", # greek small letter phi
"◊" => "◊", # lozenge
"χ" => "χ", # greek small letter chi
"ψ" => "ψ", # greek small letter psi
"ω" => "ω", # greek small letter omega
"ϑ" => "ϑ", # greek small letter theta symbol
"ϒ" => "ϒ", # greek upsilon with hook symbol
"♠" => "♠", # black spade suit
"♣" => "♣", # black club suit
"♥" => "♥", # black heart suit
"ϖ" => "ϖ", # greek pi symbol
"♦" => "♦", # black diamond suit
# common non-standard entities
"&" => "&",
"‘" => "‘",
"’" => "’",
"“" => "“",
"”" => "”",
"–" => "–",
"—" => "—",
"«" => "«",
"»" => "»",
);
# på http://www.danshort.com/HTMLentities/index.php?w=dingb finns ännu fler entiteter (dingbats)
$html_alpha_entities = array(
"Æ" => "Æ", # latin capital letter AE
"Á" => "Á", # latin capital letter A with acute
"Â" => "Â", # latin capital letter A with circumflex
"À" => "À", # latin capital letter A with grave
"Α" => "Α", # greek capital letter alpha
"Å" => "Å", # latin capital letter A with ring above
"Ã" => "Ã", # latin capital letter A with tilde
"Ä" => "Ä", # latin capital letter A with diaeresis
"Β" => "Β", # greek capital letter beta
"Ç" => "Ç", # latin capital letter C with cedilla
"Χ" => "Χ", # greek capital letter chi
"‡" => "‡", # double dagger
"Δ" => "Δ", # greek capital letter delta
"Ð" => "Ð", # latin capital letter ETH
"É" => "É", # latin capital letter E with acute
"Ê" => "Ê", # latin capital letter E with circumflex
"È" => "È", # latin capital letter E with grave
"Ε" => "Ε", # greek capital letter epsilon
"Η" => "Η", # greek capital letter eta
"Ë" => "Ë", # latin capital letter E with diaeresis
"Γ" => "Γ", # greek capital letter gamma
"Í" => "Í", # latin capital letter I with acute
"Î" => "Î", # latin capital letter I with circumflex
"Ì" => "Ì", # latin capital letter I with grave
"Ι" => "Ι", # greek capital letter iota
"Ï" => "Ï", # latin capital letter I with diaeresis
"Κ" => "Κ", # greek capital letter kappa
"Λ" => "Λ", # greek capital letter lambda
"Μ" => "Μ", # greek capital letter mu
"Ñ" => "Ñ", # latin capital letter N with tilde
"Ν" => "Ν", # greek capital letter nu
"Œ" => "Œ", # latin capital ligature OE
"Ó" => "Ó", # latin capital letter O with acute
"Ô" => "Ô", # latin capital letter O with circumflex
"Ò" => "Ò", # latin capital letter O with grave
"Ω" => "Ω", # greek capital letter omega
"Ο" => "Ο", # greek capital letter omicron
"Ø" => "Ø", # latin capital letter O with stroke
"Õ" => "Õ", # latin capital letter O with tilde
"Ö" => "Ö", # latin capital letter O with diaeresis
"Φ" => "Φ", # greek capital letter phi
"Π" => "Π", # greek capital letter pi
"″" => "″", # double prime
"Ψ" => "Ψ", # greek capital letter psi
"Ρ" => "Ρ", # greek capital letter rho
"Š" => "Š", # latin capital letter S with caron
"Σ" => "Σ", # greek capital letter sigma
"Þ" => "Þ", # latin capital letter THORN
"Τ" => "Τ", # greek capital letter tau
"Θ" => "Θ", # greek capital letter theta
"Ú" => "Ú", # latin capital letter U with acute
"Û" => "Û", # latin capital letter U with circumflex
"Ù" => "Ù", # latin capital letter U with grave
"Υ" => "Υ", # greek capital letter upsilon
"Ü" => "Ü", # latin capital letter U with diaeresis
"Ξ" => "Ξ", # greek capital letter xi
"Ý" => "Ý", # latin capital letter Y with acute
"Ÿ" => "Ÿ", # latin capital letter Y with diaeresis
"Ζ" => "Ζ", # greek capital letter zeta
"á" => "á", # latin small letter a with acute
"â" => "â", # latin small letter a with circumflex
"´" => "´", # acute accent
"æ" => "æ", # latin small letter ae
"à" => "à", # latin small letter a with grave
"ℵ" => "ℵ", # alef symbol
"α" => "α", # greek small letter alpha
"&" => "&", # ampersand
"∧" => "∧", # logical and
"∠" => "∠", # angle
"å" => "å", # latin small letter a with ring above
"≈" => "≈", # almost equal to
"ã" => "ã", # latin small letter a with tilde
"ä" => "ä", # latin small letter a with diaeresis
"„" => "„", # double low-9 quotation mark
"β" => "β", # greek small letter beta
"¦" => "¦", # broken bar
"•" => "•", # bullet
"∩" => "∩", # intersection
"ç" => "ç", # latin small letter c with cedilla
"¸" => "¸", # cedilla
"¢" => "¢", # cent sign
"χ" => "χ", # greek small letter chi
"ˆ" => "ˆ", # modifier letter circumflex accent
"♣" => "♣", # black club suit
"≅" => "≅", # approximately equal to
"©" => "©", # copyright sign
"↵" => "↵", # downwards arrow with corner leftwards
"∪" => "∪", # union
"¤" => "¤", # currency sign
"⇓" => "⇓", # downwards double arrow
"†" => "†", # dagger
"↓" => "↓", # downwards arrow
"°" => "°", # degree sign
"δ" => "δ", # greek small letter delta
"♦" => "♦", # black diamond suit
"÷" => "÷", # division sign
"é" => "é", # latin small letter e with acute
"ê" => "ê", # latin small letter e with circumflex
"è" => "è", # latin small letter e with grave
"∅" => "∅", # empty set
" " => " ", # em space
" " => " ", # en space
"ε" => "ε", # greek small letter epsilon
"≡" => "≡", # identical to
"η" => "η", # greek small letter eta
"ð" => "ð", # latin small letter eth
"ë" => "ë", # latin small letter e with diaeresis
"€" => "€", # euro sign
"∃" => "∃", # there exists
"ƒ" => "ƒ", # latin small f with hook
"∀" => "∀", # for all
"½" => "½", # vulgar fraction one half
"¼" => "¼", # vulgar fraction one quarter
"¾" => "¾", # vulgar fraction three quarters
"⁄" => "⁄", # fraction slash
"γ" => "γ", # greek small letter gamma
"≥" => "≥", # greater-than or equal to
">" => ">", # greater-than sign
"⇔" => "⇔", # left right double arrow
"↔" => "↔", # left right arrow
"♥" => "♥", # black heart suit
"…" => "…", # horizontal ellipsis
"í" => "í", # latin small letter i with acute
"î" => "î", # latin small letter i with circumflex
"¡" => "¡", # inverted exclamation mark
"ì" => "ì", # latin small letter i with grave
"ℑ" => "ℑ", # blackletter capital I
"∞" => "∞", # infinity
"∫" => "∫", # integral
"ι" => "ι", # greek small letter iota
"¿" => "¿", # inverted question mark
"∈" => "∈", # element of
"ï" => "ï", # latin small letter i with diaeresis
"κ" => "κ", # greek small letter kappa
"⇐" => "⇐", # leftwards double arrow
"λ" => "λ", # greek small letter lambda
"⟨" => "〈", # left-pointing angle bracket
"«" => "«", # left-pointing double angle quotation mark
"←" => "←", # leftwards arrow
"⌈" => "⌈", # left ceiling
"“" => "“", # left double quotation mark
"≤" => "≤", # less-than or equal to
"⌊" => "⌊", # left floor
"∗" => "∗", # asterisk operator
"◊" => "◊", # lozenge
"‹" => "‹", # single left-pointing angle quotation mark
"‘" => "‘", # left single quotation mark
"<" => "<", # less-than sign
"¯" => "¯", # macron
"—" => "—", # em dash
"µ" => "µ", # micro sign
"·" => "·", # middle dot
"−" => "−", # minus sign
"μ" => "μ", # greek small letter mu
"∇" => "∇", # nabla
" " => " ", # non-breaking space
"–" => "–", # en dash
"≠" => "≠", # not equal to
"∋" => "∋", # contains as member
"¬" => "¬", # not sign
"∉" => "∉", # not an element of
"⊄" => "⊄", # not a subset of
"ñ" => "ñ", # latin small letter n with tilde
"ν" => "ν", # greek small letter nu
"ó" => "ó", # latin small letter o with acute
"ô" => "ô", # latin small letter o with circumflex
"œ" => "œ", # latin small ligature oe
"ò" => "ò", # latin small letter o with grave
"‾" => "‾", # overline
"ω" => "ω", # greek small letter omega
"ο" => "ο", # greek small letter omicron
"⊕" => "⊕", # circled plus
"∨" => "∨", # logical or
"ª" => "ª", # feminine ordinal indicator
"º" => "º", # masculine ordinal indicator
"ø" => "ø", # latin small letter o with stroke
"õ" => "õ", # latin small letter o with tilde
"⊗" => "⊗", # circled times
"ö" => "ö", # latin small letter o with diaeresis
"¶" => "¶", # pilcrow sign
"∂" => "∂", # partial differential
"‰" => "‰", # per mille sign
"⊥" => "⊥", # up tack
"φ" => "φ", # greek small letter phi
"π" => "π", # greek small letter pi
"ϖ" => "ϖ", # greek pi symbol
"±" => "±", # plus-minus sign
"£" => "£", # pound sign
"′" => "′", # primeminutes
"∏" => "∏", # n-ary product
"∝" => "∝", # proportional to
"ψ" => "ψ", # greek small letter psi
""" => "\"", # quotation mark
"⇒" => "⇒", # rightwards double arrow
"√" => "√", # square root
"⟩" => "〉", # right-pointing angle bracket
"»" => "»", # right-pointing double angle quotation mark
"→" => "→", # rightwards arrow
"⌉" => "⌉", # right ceiling
"”" => "”", # right double quotation mark
"ℜ" => "ℜ", # blackletter capital R
"®" => "®", # registered sign
"⌋" => "⌋", # right floor
"ρ" => "ρ", # greek small letter rho
"›" => "›", # single right-pointing angle quotation mark
"’" => "’", # right single quotation mark
"‚" => "‚", # single low-9 quotation mark
"š" => "š", # latin small letter s with caron
"⋅" => "⋅", # dot operator
"§" => "§", # section sign
"­" => "", # soft hyphen
"σ" => "σ", # greek small letter sigma
"ς" => "ς", # greek small letter final sigma
"∼" => "∼", # tilde operator
"♠" => "♠", # black spade suit
"⊂" => "⊂", # subset of
"⊆" => "⊆", # subset of or equal to
"∑" => "∑", # n-ary sumation
"¹" => "¹", # superscript one
"²" => "²", # superscript two
"³" => "³", # superscript three
"⊃" => "⊃", # superset of
"⊇" => "⊇", # superset of or equal to
"ß " => "ß", # latin small letter sharp s
"τ" => "τ", # greek small letter tau
"∴" => "∴", # therefore
"θ" => "θ", # greek small letter theta
"ϑ" => "ϑ", # greek small letter theta symbol
" " => " ", # thin space
"þ" => "þ", # latin small letter thorn
"˜" => "˜", # small tilde
"×" => "×", # multiplication sign
"™" => "™", # trade mark sign
"⇑" => "⇑", # upwards double arrow
"ú" => "ú", # latin small letter u with acute
"↑" => "↑", # upwards arrow
"û" => "û", # latin small letter u with circumflex
"ù" => "ù", # latin small letter u with grave
"¨" => "¨", # diaeresis
"ϒ" => "ϒ", # greek upsilon with hook symbol
"υ" => "υ", # greek small letter upsilon
"ü" => "ü", # latin small letter u with diaeresis
"℘" => "℘", # script capital P
"ξ" => "ξ", # greek small letter xi
"ý" => "ý", # latin small letter y with acute
"¥" => "¥", # yen sign
"ÿ" => "ÿ", # latin small letter y with diaeresis
"ζ" => "ζ", # greek small letter zeta
"‍" => "", # zero width joiner
"‌" => "", # zero width non-joiner
);
# ä --> ä
function decode_html_entities($string)
{
global $html_num_entities, $html_alpha_entities;
$codes1 = array_keys($html_num_entities);
$chars1 = array_values($html_num_entities);
$codes2 = array_keys($html_alpha_entities);
$chars2 = array_values($html_alpha_entities);
$string = str_replace($codes1, $chars1, $string);
$string = str_replace($codes2, $chars2, $string);
return $string;
}
# ä --> ä
function encode_html_entities($string)
{
global $html_num_entities, $html_alpha_entities;
$codes = array_keys($html_alpha_entities);
$chars = array_values($html_alpha_entities);
$string = str_replace($chars, $codes, $string);
$string = preg_replace("/&(#\d+|[\da-zA-Z]+);/", "&\\1;", $string);
$string = str_replace(" ", " ", $string);
return $string;
}
?>