mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Implement request #54355 (Test for de_DE doesn't use UTF-8 locales). Patch by
Ondřej Surý.
This commit is contained in:
parent
8307f9e892
commit
13a91f86b7
@ -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";
|
||||
?>
|
||||
|
@ -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']);
|
||||
|
Loading…
Reference in New Issue
Block a user