php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26842 localeconv gives wrong decimal place values for locale it_IT
Submitted: 2004-01-08 07:32 UTC Modified: 2004-01-08 09:25 UTC
From: marko at oblo dot com Assigned:
Status: Not a bug Package: *Languages/Translation
PHP Version: 4.3.4 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 + 47 = ?
Subscribe to this entry?

 
 [2004-01-08 07:32 UTC] marko at oblo dot com
Description:
------------
localeconv() function returns the wrong values for int_frac_digits and frac_digits. they should be "2" and not "0" (which was correct in the time of the Lira)


Reproduce code:
---------------
<?php
setlocale(LC_ALL, it_IT);
var_dump(localeconv());


Expected result:
----------------
array(18) {
  ["decimal_point"]=>
  string(1) "."
<snip>
  ["int_frac_digits"]=>
  int(2)
  ["frac_digits"]=>
  int(2)
<snip>
  ["mon_grouping"]=>
  array(2) {
    [0]=>
    int(3)
    [1]=>
    int(3)
  }
}

Actual result:
--------------
array(18) {
  ["decimal_point"]=>
  string(1) "."
<snip>
  ["int_frac_digits"]=>
  int(0)
  ["frac_digits"]=>
  int(0)
<snip>
  ["mon_grouping"]=>
  array(2) {
    [0]=>
    int(3)
    [1]=>
    int(3)
  }
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-08 09:25 UTC] eru@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is an issue with the locale installed on your computer. Please consult the support of your Linux distribution.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC