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/htmlent.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/htmlent.phpt')
-rw-r--r-- | ext/mbstring/tests/htmlent.phpt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ext/mbstring/tests/htmlent.phpt b/ext/mbstring/tests/htmlent.phpt new file mode 100644 index 0000000..5af96c7 --- /dev/null +++ b/ext/mbstring/tests/htmlent.phpt @@ -0,0 +1,42 @@ +--TEST-- +HTML input/output +--SKIPIF-- +<?php + ini_set('include_path', dirname(__FILE__)); + extension_loaded('mbstring') or die('skip mbstring not available'); +?> +--INI-- +output_buffering=4096 +output_handler=mb_output_handler +zlib.output_compression= +arg_separator.input=x +error_reporting=0 +mbstring.http_input=HTML-ENTITIES +mbstring.internal_encoding=UTF-8 +mbstring.http_output=HTML-ENTITIES +mbstring.encoding_translation=1 +filter.default=unsafe_raw +--FILE-- +<?php +// enable output encoding through output handler +//ob_start("mb_output_handler"); +// @... are must be decoded on input these are not reencoded on output. +// If you see @AB on output this means input encoding fails. +// If you do not see ä... on output this means output encoding fails. +// Using UTF-8 internally allows to encode/decode ALL characters. +// &128... will stay as they are since their character codes are above 127 +// and they do not have a named entity representaion. +?> +<?php echo mb_http_input('l').'>'.mb_internal_encoding().'>'.mb_http_output();?> + +<?php mb_parse_str("test=&@AB€‚äöü€⟨⟩", $test); +print_r($test); +?> +===DONE=== +--EXPECT-- +HTML-ENTITIES>UTF-8>HTML-ENTITIES +Array +( + [test] => &@AB€‚äöü€⟨⟩ +) +===DONE=== |