php-src/ext/standard/tests/strings/strtotitle.phpt

40 lines
786 B
Plaintext
Raw Normal View History

--TEST--
Test strtotitle
--SKIPIF--
<?php
if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) {
die("skip locale needed for this test is not supported on this platform");
}
?>
--INI--
unicode.script_encoding=ISO-8859-1
unicode.output_encoding=ISO-8859-1
--FILE--
<?php
declare(encoding="latin1");
setlocale(LC_ALL, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1");
$strings = array( "<22>en", "<22>ret", "<22>ret <20>en" );
foreach( $strings as $string )
{
echo ucwords( $string ), "\n";
echo strtotitle( $string ), "\n";
}
?>
--EXPECT--
<EFBFBD>en
<EFBFBD>en
<EFBFBD>ret
<EFBFBD>ret
<EFBFBD>ret <20>en
<EFBFBD>ret <20>en
2006-12-06 13:21:48 +00:00
--UEXPECTF--
Strict Standards: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
SSen
Ssen
<EFBFBD>ret
<EFBFBD>ret
<EFBFBD>ret SSen
<EFBFBD>ret Ssen