Implement request #54355 (Test for de_DE doesn't use UTF-8 locales). Patch by

Ondřej Surý.
This commit is contained in:
Adam Harvey 2011-03-23 08:59:11 +00:00
parent 8307f9e892
commit 13a91f86b7
2 changed files with 4 additions and 4 deletions

View File

@ -4,14 +4,14 @@ Bug #12647 (Locale settings affecting float parsing)
precision=14
--SKIPIF--
<?php # try to activate a german locale
if (setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1") === FALSE) {
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
print "skip";
}
?>
--FILE--
<?php
# activate the german locale
setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1");
setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1");
echo (float)"3.14", "\n";
?>

View File

@ -2,7 +2,7 @@
Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X)
--SKIPIF--
<?php # try to activate a german locale
if (setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge") === FALSE) {
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
print "skip setlocale() failed";
} elseif (strtolower(php_uname('s')) == 'darwin') {
print "skip ok to fail on MacOS X";
@ -11,7 +11,7 @@ if (setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge") === FALSE) {
--FILE--
<?php
# activate the german locale
setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge");
setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1");
$lc = localeconv();
printf("decimal_point: %s\n", $lc['decimal_point']);