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