diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/mbstring/tests/mb_decode_numericentity.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
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 |