--TEST--
Translation of HTML entities for encoding ISO-8859-15
--FILE--
array(0xA0, "NO-BREAK SPACE"),
0x00A1 => array(0xA1, "INVERTED EXCLAMATION MARK"),
0x00A2 => array(0xA2, "CENT SIGN"),
0x00A3 => array(0xA3, "POUND SIGN"),
0x20AC => array(0xA4, "EURO SIGN"),
0x00A5 => array(0xA5, "YEN SIGN"),
0x0160 => array(0xA6, "LATIN CAPITAL LETTER S WITH CARON"),
0x00A7 => array(0xA7, "SECTION SIGN"),
0x0161 => array(0xA8, "LATIN SMALL LETTER S WITH CARON"),
0x00A9 => array(0xA9, "COPYRIGHT SIGN"),
0x00AA => array(0xAA, "FEMININE ORDINAL INDICATOR"),
0x00AB => array(0xAB, "LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"),
0x00AC => array(0xAC, "NOT SIGN"),
0x00AD => array(0xAD, "SOFT HYPHEN"),
0x00AE => array(0xAE, "REGISTERED SIGN"),
0x00AF => array(0xAF, "MACRON"),
0x00B0 => array(0xB0, "DEGREE SIGN"),
0x00B1 => array(0xB1, "PLUS-MINUS SIGN"),
0x00B2 => array(0xB2, "SUPERSCRIPT TWO"),
0x00B3 => array(0xB3, "SUPERSCRIPT THREE"),
0x017D => array(0xB4, "LATIN CAPITAL LETTER Z WITH CARON"),
0x00B5 => array(0xB5, "MICRO SIGN"),
0x00B6 => array(0xB6, "PILCROW SIGN"),
0x00B7 => array(0xB7, "MIDDLE DOT"),
0x017E => array(0xB8, "LATIN SMALL LETTER Z WITH CARON"),
0x00B9 => array(0xB9, "SUPERSCRIPT ONE"),
0x00BA => array(0xBA, "MASCULINE ORDINAL INDICATOR"),
0x00BB => array(0xBB, "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"),
0x0152 => array(0xBC, "LATIN CAPITAL LIGATURE OE"),
0x0153 => array(0xBD, "LATIN SMALL LIGATURE OE"),
0x0178 => array(0xBE, "LATIN CAPITAL LETTER Y WITH DIAERESIS"),
0x00BF => array(0xBF, "INVERTED QUESTION MARK"),
0x00C0 => array(0xC0, "LATIN CAPITAL LETTER A WITH GRAVE"),
0x00C1 => array(0xC1, "LATIN CAPITAL LETTER A WITH ACUTE"),
0x00C2 => array(0xC2, "LATIN CAPITAL LETTER A WITH CIRCUMFLEX"),
0x00C3 => array(0xC3, "LATIN CAPITAL LETTER A WITH TILDE"),
0x00C4 => array(0xC4, "LATIN CAPITAL LETTER A WITH DIAERESIS"),
0x00C5 => array(0xC5, "LATIN CAPITAL LETTER A WITH RING ABOVE"),
0x00C6 => array(0xC6, "LATIN CAPITAL LETTER AE"),
0x00C7 => array(0xC7, "LATIN CAPITAL LETTER C WITH CEDILLA"),
0x00C8 => array(0xC8, "LATIN CAPITAL LETTER E WITH GRAVE"),
0x00C9 => array(0xC9, "LATIN CAPITAL LETTER E WITH ACUTE"),
0x00CA => array(0xCA, "LATIN CAPITAL LETTER E WITH CIRCUMFLEX"),
0x00CB => array(0xCB, "LATIN CAPITAL LETTER E WITH DIAERESIS"),
0x00CC => array(0xCC, "LATIN CAPITAL LETTER I WITH GRAVE"),
0x00CD => array(0xCD, "LATIN CAPITAL LETTER I WITH ACUTE"),
0x00CE => array(0xCE, "LATIN CAPITAL LETTER I WITH CIRCUMFLEX"),
0x00CF => array(0xCF, "LATIN CAPITAL LETTER I WITH DIAERESIS"),
0x00D0 => array(0xD0, "LATIN CAPITAL LETTER ETH"),
0x00D1 => array(0xD1, "LATIN CAPITAL LETTER N WITH TILDE"),
0x00D2 => array(0xD2, "LATIN CAPITAL LETTER O WITH GRAVE"),
0x00D3 => array(0xD3, "LATIN CAPITAL LETTER O WITH ACUTE"),
0x00D4 => array(0xD4, "LATIN CAPITAL LETTER O WITH CIRCUMFLEX"),
0x00D5 => array(0xD5, "LATIN CAPITAL LETTER O WITH TILDE"),
0x00D6 => array(0xD6, "LATIN CAPITAL LETTER O WITH DIAERESIS"),
0x00D7 => array(0xD7, "MULTIPLICATION SIGN"),
0x00D8 => array(0xD8, "LATIN CAPITAL LETTER O WITH STROKE"),
0x00D9 => array(0xD9, "LATIN CAPITAL LETTER U WITH GRAVE"),
0x00DA => array(0xDA, "LATIN CAPITAL LETTER U WITH ACUTE"),
0x00DB => array(0xDB, "LATIN CAPITAL LETTER U WITH CIRCUMFLEX"),
0x00DC => array(0xDC, "LATIN CAPITAL LETTER U WITH DIAERESIS"),
0x00DD => array(0xDD, "LATIN CAPITAL LETTER Y WITH ACUTE"),
0x00DE => array(0xDE, "LATIN CAPITAL LETTER THORN"),
0x00DF => array(0xDF, "LATIN SMALL LETTER SHARP S"),
0x00E0 => array(0xE0, "LATIN SMALL LETTER A WITH GRAVE"),
0x00E1 => array(0xE1, "LATIN SMALL LETTER A WITH ACUTE"),
0x00E2 => array(0xE2, "LATIN SMALL LETTER A WITH CIRCUMFLEX"),
0x00E3 => array(0xE3, "LATIN SMALL LETTER A WITH TILDE"),
0x00E4 => array(0xE4, "LATIN SMALL LETTER A WITH DIAERESIS"),
0x00E5 => array(0xE5, "LATIN SMALL LETTER A WITH RING ABOVE"),
0x00E6 => array(0xE6, "LATIN SMALL LETTER AE"),
0x00E7 => array(0xE7, "LATIN SMALL LETTER C WITH CEDILLA"),
0x00E8 => array(0xE8, "LATIN SMALL LETTER E WITH GRAVE"),
0x00E9 => array(0xE9, "LATIN SMALL LETTER E WITH ACUTE"),
0x00EA => array(0xEA, "LATIN SMALL LETTER E WITH CIRCUMFLEX"),
0x00EB => array(0xEB, "LATIN SMALL LETTER E WITH DIAERESIS"),
0x00EC => array(0xEC, "LATIN SMALL LETTER I WITH GRAVE"),
0x00ED => array(0xED, "LATIN SMALL LETTER I WITH ACUTE"),
0x00EE => array(0xEE, "LATIN SMALL LETTER I WITH CIRCUMFLEX"),
0x00EF => array(0xEF, "LATIN SMALL LETTER I WITH DIAERESIS"),
0x00F0 => array(0xF0, "LATIN SMALL LETTER ETH"),
0x00F1 => array(0xF1, "LATIN SMALL LETTER N WITH TILDE"),
0x00F2 => array(0xF2, "LATIN SMALL LETTER O WITH GRAVE"),
0x00F3 => array(0xF3, "LATIN SMALL LETTER O WITH ACUTE"),
0x00F4 => array(0xF4, "LATIN SMALL LETTER O WITH CIRCUMFLEX"),
0x00F5 => array(0xF5, "LATIN SMALL LETTER O WITH TILDE"),
0x00F6 => array(0xF6, "LATIN SMALL LETTER O WITH DIAERESIS"),
0x00F7 => array(0xF7, "DIVISION SIGN"),
0x00F8 => array(0xF8, "LATIN SMALL LETTER O WITH STROKE"),
0x00F9 => array(0xF9, "LATIN SMALL LETTER U WITH GRAVE"),
0x00FA => array(0xFA, "LATIN SMALL LETTER U WITH ACUTE"),
0x00FB => array(0xFB, "LATIN SMALL LETTER U WITH CIRCUMFLEX"),
0x00FC => array(0xFC, "LATIN SMALL LETTER U WITH DIAERESIS"),
0x00FD => array(0xFD, "LATIN SMALL LETTER Y WITH ACUTE"),
0x00FE => array(0xFE, "LATIN SMALL LETTER THORN"),
0x00FF => array(0xFF, "LATIN SMALL LETTER Y WITH DIAERESIS"),
);
foreach ($arr as $u => $v) {
$ent = sprintf("%X;", $u);
$res = html_entity_decode($ent, ENT_QUOTES, 'ISO-8859-15');
$d = unpack("H*", $res);
echo sprintf("%s: %s => %s\n", $v[1], $ent, $d[1]);
$ent = sprintf("%X;", $v[0]);
$res = html_entity_decode($ent, ENT_QUOTES, 'ISO-8859-15');
if ($res[0] != "&" || $res[1] != "#")
$res = unpack("H*", $res)[1];
echo sprintf("%s => %s\n\n", $ent, $res);
}
--EXPECT--
NO-BREAK SPACE: => a0
=> a0
INVERTED EXCLAMATION MARK: ¡ => a1
¡ => a1
CENT SIGN: ¢ => a2
¢ => a2
POUND SIGN: £ => a3
£ => a3
EURO SIGN: € => a4
¤ => ¤
YEN SIGN: ¥ => a5
¥ => a5
LATIN CAPITAL LETTER S WITH CARON: Š => a6
¦ => ¦
SECTION SIGN: § => a7
§ => a7
LATIN SMALL LETTER S WITH CARON: š => a8
¨ => ¨
COPYRIGHT SIGN: © => a9
© => a9
FEMININE ORDINAL INDICATOR: ª => aa
ª => aa
LEFT-POINTING DOUBLE ANGLE QUOTATION MARK: « => ab
« => ab
NOT SIGN: ¬ => ac
¬ => ac
SOFT HYPHEN: => ad
=> ad
REGISTERED SIGN: ® => ae
® => ae
MACRON: ¯ => af
¯ => af
DEGREE SIGN: ° => b0
° => b0
PLUS-MINUS SIGN: ± => b1
± => b1
SUPERSCRIPT TWO: ² => b2
² => b2
SUPERSCRIPT THREE: ³ => b3
³ => b3
LATIN CAPITAL LETTER Z WITH CARON: Ž => b4
´ => ´
MICRO SIGN: µ => b5
µ => b5
PILCROW SIGN: ¶ => b6
¶ => b6
MIDDLE DOT: · => b7
· => b7
LATIN SMALL LETTER Z WITH CARON: ž => b8
¸ => ¸
SUPERSCRIPT ONE: ¹ => b9
¹ => b9
MASCULINE ORDINAL INDICATOR: º => ba
º => ba
RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK: » => bb
» => bb
LATIN CAPITAL LIGATURE OE: Œ => bc
¼ => ¼
LATIN SMALL LIGATURE OE: œ => bd
½ => ½
LATIN CAPITAL LETTER Y WITH DIAERESIS: Ÿ => be
¾ => ¾
INVERTED QUESTION MARK: ¿ => bf
¿ => bf
LATIN CAPITAL LETTER A WITH GRAVE: À => c0
À => c0
LATIN CAPITAL LETTER A WITH ACUTE: Á => c1
Á => c1
LATIN CAPITAL LETTER A WITH CIRCUMFLEX: Â => c2
 => c2
LATIN CAPITAL LETTER A WITH TILDE: Ã => c3
à => c3
LATIN CAPITAL LETTER A WITH DIAERESIS: Ä => c4
Ä => c4
LATIN CAPITAL LETTER A WITH RING ABOVE: Å => c5
Å => c5
LATIN CAPITAL LETTER AE: Æ => c6
Æ => c6
LATIN CAPITAL LETTER C WITH CEDILLA: Ç => c7
Ç => c7
LATIN CAPITAL LETTER E WITH GRAVE: È => c8
È => c8
LATIN CAPITAL LETTER E WITH ACUTE: É => c9
É => c9
LATIN CAPITAL LETTER E WITH CIRCUMFLEX: Ê => ca
Ê => ca
LATIN CAPITAL LETTER E WITH DIAERESIS: Ë => cb
Ë => cb
LATIN CAPITAL LETTER I WITH GRAVE: Ì => cc
Ì => cc
LATIN CAPITAL LETTER I WITH ACUTE: Í => cd
Í => cd
LATIN CAPITAL LETTER I WITH CIRCUMFLEX: Î => ce
Î => ce
LATIN CAPITAL LETTER I WITH DIAERESIS: Ï => cf
Ï => cf
LATIN CAPITAL LETTER ETH: Ð => d0
Ð => d0
LATIN CAPITAL LETTER N WITH TILDE: Ñ => d1
Ñ => d1
LATIN CAPITAL LETTER O WITH GRAVE: Ò => d2
Ò => d2
LATIN CAPITAL LETTER O WITH ACUTE: Ó => d3
Ó => d3
LATIN CAPITAL LETTER O WITH CIRCUMFLEX: Ô => d4
Ô => d4
LATIN CAPITAL LETTER O WITH TILDE: Õ => d5
Õ => d5
LATIN CAPITAL LETTER O WITH DIAERESIS: Ö => d6
Ö => d6
MULTIPLICATION SIGN: × => d7
× => d7
LATIN CAPITAL LETTER O WITH STROKE: Ø => d8
Ø => d8
LATIN CAPITAL LETTER U WITH GRAVE: Ù => d9
Ù => d9
LATIN CAPITAL LETTER U WITH ACUTE: Ú => da
Ú => da
LATIN CAPITAL LETTER U WITH CIRCUMFLEX: Û => db
Û => db
LATIN CAPITAL LETTER U WITH DIAERESIS: Ü => dc
Ü => dc
LATIN CAPITAL LETTER Y WITH ACUTE: Ý => dd
Ý => dd
LATIN CAPITAL LETTER THORN: Þ => de
Þ => de
LATIN SMALL LETTER SHARP S: ß => df
ß => df
LATIN SMALL LETTER A WITH GRAVE: à => e0
à => e0
LATIN SMALL LETTER A WITH ACUTE: á => e1
á => e1
LATIN SMALL LETTER A WITH CIRCUMFLEX: â => e2
â => e2
LATIN SMALL LETTER A WITH TILDE: ã => e3
ã => e3
LATIN SMALL LETTER A WITH DIAERESIS: ä => e4
ä => e4
LATIN SMALL LETTER A WITH RING ABOVE: å => e5
å => e5
LATIN SMALL LETTER AE: æ => e6
æ => e6
LATIN SMALL LETTER C WITH CEDILLA: ç => e7
ç => e7
LATIN SMALL LETTER E WITH GRAVE: è => e8
è => e8
LATIN SMALL LETTER E WITH ACUTE: é => e9
é => e9
LATIN SMALL LETTER E WITH CIRCUMFLEX: ê => ea
ê => ea
LATIN SMALL LETTER E WITH DIAERESIS: ë => eb
ë => eb
LATIN SMALL LETTER I WITH GRAVE: ì => ec
ì => ec
LATIN SMALL LETTER I WITH ACUTE: í => ed
í => ed
LATIN SMALL LETTER I WITH CIRCUMFLEX: î => ee
î => ee
LATIN SMALL LETTER I WITH DIAERESIS: ï => ef
ï => ef
LATIN SMALL LETTER ETH: ð => f0
ð => f0
LATIN SMALL LETTER N WITH TILDE: ñ => f1
ñ => f1
LATIN SMALL LETTER O WITH GRAVE: ò => f2
ò => f2
LATIN SMALL LETTER O WITH ACUTE: ó => f3
ó => f3
LATIN SMALL LETTER O WITH CIRCUMFLEX: ô => f4
ô => f4
LATIN SMALL LETTER O WITH TILDE: õ => f5
õ => f5
LATIN SMALL LETTER O WITH DIAERESIS: ö => f6
ö => f6
DIVISION SIGN: ÷ => f7
÷ => f7
LATIN SMALL LETTER O WITH STROKE: ø => f8
ø => f8
LATIN SMALL LETTER U WITH GRAVE: ù => f9
ù => f9
LATIN SMALL LETTER U WITH ACUTE: ú => fa
ú => fa
LATIN SMALL LETTER U WITH CIRCUMFLEX: û => fb
û => fb
LATIN SMALL LETTER U WITH DIAERESIS: ü => fc
ü => fc
LATIN SMALL LETTER Y WITH ACUTE: ý => fd
ý => fd
LATIN SMALL LETTER THORN: þ => fe
þ => fe
LATIN SMALL LETTER Y WITH DIAERESIS: ÿ => ff
ÿ => ff