FW: php4(PHP_4_3) /ext/standard/tests/strings htmlentities15.phpt htmlentities16.phpt
| From: | James Cox | Date: | Mon, 24 Mar 2003 19:40:37 +0000 |
| Subject: | FW: php4(PHP_4_3) /ext/standard/tests/strings htmlentities15.phpt htmlentities16.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19742@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Moriyoshi Koizumi [mailto:moriyoshi@at.wakwak.com]
> Sent: 24 March 2003 19:22
> To: php-cvs@lists.php.net
> Subject: cvs: php4(PHP_4_3) /ext/standard/tests/strings
> htmlentities15.phpt htmlentities16.phpt
>
>
> moriyoshi Mon Mar 24 14:22:19 2003 EDT
>
> Added files: (Branch: PHP_4_3)
> /php4/ext/standard/tests/strings htmlentities15.phpt
> htmlentities16.phpt
> Log:
> MFH(initial): added test cases for new functionality
>
>
>
> Index: php4/ext/standard/tests/strings/htmlentities15.phpt
> +++ php4/ext/standard/tests/strings/htmlentities15.phpt
> --TEST--
> htmlentities() test 15 (setlocale / KOI8-R)
> --INI--
> output_handler=
> default_charset=
> mbstring.internal_encoding=none
> --SKIPIF--
> <?php
> $result = (bool)setlocale(LC_CTYPE, "ru_RU.koi8r");
> if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) {
> die("skip setlocale() failed\n");
> }
> ?>
> --FILE--
> <?php
> setlocale(LC_CTYPE, "ru_RU.koi8r");
> $str = "ÒÏÓËÏÛÎÙÊ";
> var_dump($str, htmlentities($str, ENT_QUOTES, ''));
> ?>
> --EXPECT--
> string(9) "ÒÏÓËÏÛÎÙÊ"
> string(63)
>
> "роскошный"
>
> Index: php4/ext/standard/tests/strings/htmlentities16.phpt
> +++ php4/ext/standard/tests/strings/htmlentities16.phpt
> --TEST--
> htmlentities() test 16 (mbstring / cp1251)
> --INI--
> output_handler=
> --SKIPIF--
> <?php
> extension_loaded("mbstring") or die("skip mbstring not
> available\n");
> mb_internal_encoding('cp1251');
> $php_errormsg = NULL;
>
> @htmlentities("\x88\xa9\xd2\xcf\xd3\xcb\xcf\xdb\xce\xd9\xca",
> ENT_QUOTES, '');
> if ($php_errormsg) {
> die("skip cp1251 chracter set is not supported on
> this platform.\n");
> }
> ?>
> --FILE--
> <?php
> mb_internal_encoding('cp1251');
> $str = "\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9";
> var_dump($str, htmlentities($str, ENT_QUOTES, ''));
> ?>
> --EXPECT--
> string(11) "©ÒÏÓËÏÛÎÙÊ"
> string(63)
>
> "€©роскошн

> 99;й"
>
>
>