diff options
| author | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
| commit | 0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch) | |
| tree | 91f01b0d06916c78262404096bfd466b8e95e5b5 /ext/mbstring/tests/mb_decode_numericentity.phpt | |
| parent | d3a8757891280dc6650ca7eead67830c794b0e7b (diff) | |
| download | php-upstream/5.3.1.tar.gz | |
Imported Upstream version 5.3.1upstream/5.3.1
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 000000000..6008ef9a9 --- /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 |
