Annotation of embedaddon/php/ext/mbstring/tests/mb_decode_numericentity.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test mb_decode_numericentity() function : Convert HTML-Entities to UTF-8
3: --SKIPIF--
4: <?php
5: if (!extension_loaded('mbstring')) die('skip mbstring not enabled');
6: function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
7: ?>
8: --FILE--
9: <?php
10: $str1 = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ';
11: $str2 = 'ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦';
12: $str3 = 'aŒbœcŠdše€fg';
13: $convmap = array(0x0, 0x2FFFF, 0, 0xFFFF);
14: echo mb_decode_numericentity($str1, $convmap, "UTF-8")."\n";
15: echo mb_decode_numericentity($str2, $convmap, "UTF-8")."\n";
16: echo mb_decode_numericentity($str3, $convmap, "UTF-8")."\n";
17: ?>
18: --EXPECT--
19: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
20: ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦
21: aŒbœcŠdše€fg
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>