2002-10-24 21:11:41 +00:00
|
|
|
|
--TEST--
|
|
|
|
|
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
|
|
|
|
|
--SKIPIF--
|
2002-11-06 15:06:35 +00:00
|
|
|
|
<?php
|
|
|
|
|
$result = (bool)setlocale(LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP");
|
2002-11-06 15:14:58 +00:00
|
|
|
|
if (!$result || preg_match('/EUC[^a-zA-Z]*JP/i', setlocale(LC_CTYPE, 0)) == 0) {
|
2002-11-06 15:06:35 +00:00
|
|
|
|
die("skip setlocale() failed\n");
|
|
|
|
|
}
|
2007-09-13 15:36:37 +00:00
|
|
|
|
echo "warn possibly braindead libc\n";
|
2002-11-06 15:06:35 +00:00
|
|
|
|
?>
|
2002-10-24 21:11:41 +00:00
|
|
|
|
--INI--
|
2002-11-03 08:37:59 +00:00
|
|
|
|
output_handler=
|
2002-11-12 21:37:54 +00:00
|
|
|
|
default_charset=
|
|
|
|
|
mbstring.internal_encoding=none
|
2002-10-24 21:11:41 +00:00
|
|
|
|
--FILE--
|
|
|
|
|
<?php
|
2002-10-27 17:07:26 +00:00
|
|
|
|
setlocale( LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP" );
|
2002-10-24 21:11:41 +00:00
|
|
|
|
var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, ''));
|
|
|
|
|
?>
|
|
|
|
|
--EXPECT--
|
|
|
|
|
string(6) "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|