Annotation of embedaddon/php/ext/mbstring/tests/htmlent.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: HTML input/output
                      3: --SKIPIF--
                      4: <?php 
                      5:        ini_set('include_path', dirname(__FILE__)); 
                      6:        extension_loaded('mbstring') or die('skip mbstring not available'); 
                      7: ?>
                      8: --INI--
                      9: output_buffering=4096
                     10: output_handler=mb_output_handler
                     11: zlib.output_compression=
                     12: arg_separator.input=x
                     13: error_reporting=0
                     14: mbstring.http_input=HTML-ENTITIES
                     15: mbstring.internal_encoding=UTF-8
                     16: mbstring.http_output=HTML-ENTITIES
                     17: mbstring.encoding_translation=1
1.1.1.2 ! misho      18: filter.default=unsafe_raw
1.1       misho      19: --FILE--
                     20: <?php
                     21: // enable output encoding through output handler
                     22: //ob_start("mb_output_handler");
                     23: // &#64... are must be decoded on input these are not reencoded on output. 
                     24: // If you see &#64;&#65;&#66; on output this means input encoding fails.
                     25: // If you do not see &auml;... on output this means output encoding fails.
                     26: // Using UTF-8 internally allows to encode/decode ALL characters.
                     27: // &128... will stay as they are since their character codes are above 127
                     28: // and they do not have a named entity representaion.
                     29: ?>
                     30: <?php echo mb_http_input('l').'>'.mb_internal_encoding().'>'.mb_http_output();?>
                     31: 
                     32: <?php mb_parse_str("test=&#38;&#64;&#65;&#66;&#128;&#129;&#130;&auml;&ouml;&uuml;&euro;&lang;&rang;", $test);
                     33: print_r($test);
                     34: ?>
                     35: ===DONE===
                     36: --EXPECT--
                     37: HTML-ENTITIES>UTF-8>HTML-ENTITIES
                     38: Array
                     39: (
                     40:     [test] => &@AB&#128;&#129;&#130;&auml;&ouml;&uuml;&euro;&lang;&rang;
                     41: )
                     42: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>