bug30638.phpt 690 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X)
  3. --SKIPIF--
  4. <?php # try to activate a german locale
  5. if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
  6. print "skip setlocale() failed";
  7. } elseif (strtolower(php_uname('s')) == 'darwin') {
  8. print "skip ok to fail on MacOS X";
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. # activate the german locale
  14. setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1");
  15. $lc = localeconv();
  16. printf("decimal_point: %s\n", $lc['decimal_point']);
  17. printf("thousands_sep: %s\n", $lc['thousands_sep']);
  18. ?>
  19. --EXPECT--
  20. decimal_point: ,
  21. thousands_sep: .