ID:               31801
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jordi at jcanals dot net
-Status:           Assigned
+Status:           Bogus
 Bug Type:         *Languages/Translation
 Operating System: Linux
 PHP Version:      5.0.3
 Assigned To:      derick
 New Comment:

Complain to the glibc maintainers. PHP is behaving correctly as it uses
the data that glibc provides. See the file
tequila:/usr/share/i18n/locales/es_ES (search for LC_NUMERIC twice).

Not a bug in PHP.


Previous Comments:
------------------------------------------------------------------------

[2005-02-02 01:44:23] jordi at jcanals dot net

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 this bug report at http://bugs.php.net/?id=31801&edit=1

Reply via email to