#31801 [NEW]: localeconv returns wrong LC_NUMERIC settings
| From: | jordi at jcanals dot net | Date: | Wed, 02 Feb 2005 00:44:23 +0000 |
| Subject: | #31801 [NEW]: localeconv returns wrong LC_NUMERIC settings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-73226@lists.php.net to get a copy of this message | ||
From: jordi at jcanals dot net
Operating system: Linux
PHP version: 5.0.3
PHP Bug Type: *Languages/Translation
Bug description: localeconv returns wrong LC_NUMERIC settings
Description:
------------
The localeconv() provides wrong information in some locales
It produces wrong results for the es_ES and ca_ES locales. As I only
provide one example, in both locales I get the same wrong result, and for
both, the same correct result below shoud be returned.
This was solved for the locale de_DE as a solution to the bug #30638 (Now
for de_DE it returns the correct values).
On windows with the equivalent locales it returns the correct results.
Windows equivalents are: Spanish for es_ES and Catalan for ca_ES.
Reproduce code:
---------------
<?php
setlocale(LC_ALL, 'es_ES');
$lc = localeconv();
echo '<pre>'; print_r($lc); echo '</pre>';
?>
Expected result:
----------------
Array
(
[decimal_point] => ,
[thousands_sep] => .
[int_curr_symbol] => EUR
[currency_symbol] => EUR
[mon_decimal_point] => ,
[mon_thousands_sep] => .
[positive_sign] =>
[negative_sign] => -
[int_frac_digits] => 2
[frac_digits] => 2
[p_cs_precedes] => 0
[p_sep_by_space] => 1
[n_cs_precedes] => 0
[n_sep_by_space] => 1
[p_sign_posn] => 1
[n_sign_posn] => 1
[grouping] => Array
(
[0] => 3
[1] => 3
)
[mon_grouping] => Array
(
[0] => 3
[1] => 3
)
)
Note: This is the same result that provides other european languages like
de_DE
Actual result:
--------------
Array
(
[decimal_point] => ,
[thousands_sep] =>
[int_curr_symbol] => EUR
[currency_symbol] => EUR
[mon_decimal_point] => ,
[mon_thousands_sep] => .
[positive_sign] =>
[negative_sign] => -
[int_frac_digits] => 2
[frac_digits] => 2
[p_cs_precedes] => 1
[p_sep_by_space] => 1
[n_cs_precedes] => 1
[n_sep_by_space] => 1
[p_sign_posn] => 1
[n_sign_posn] => 1
[grouping] => Array
(
)
[mon_grouping] => Array
(
[0] => 3
[1] => 3
)
)
Note: Both locales es_ES and ca_ES provide the same wrong result.
--
Edit bug report at http://bugs.php.net/?id=31801&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31801&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31801&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31801&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31801&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31801&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31801&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31801&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31801&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31801&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31801&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31801&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31801&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31801&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31801&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31801&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31801&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31801&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31801&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31801&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31801&r=mysqlcfg