php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16532 locale information (LC_NUMERIC) not used in bcmath functions
Submitted: 2002-04-10 11:53 UTC Modified: 2002-07-23 14:13 UTC
From: anze at volja dot net Assigned:
Status: Not a bug Package: BC math related
PHP Version: 4.1.0 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: anze at volja dot net
New email:
PHP Version: OS:

 

 [2002-04-10 11:53 UTC] anze at volja dot net
Summary says it all...

Some could argue it is a missing feature, not a bug, but 
it would make a life a bit easier for non-english 
developers, especially as this library is ofteh used for 
monetary stuff...

<?php

// first setlocale():
if (
    (FALSE===setlocale("LC_ALL","sl_SI"))&&
    (FALSE===setlocale("LC_ALL","slovenian"))&&
    (FALSE===setlocale("LC_ALL","slovene"))&&
    (FALSE===setlocale("LC_ALL","slovenski"))&&
    (FALSE===setlocale("LC_ALL","sl"))
   )
  echo "SETLOCALE() ERROR!!!<br>\n";

// this line outputs "0.00" instead of "0,80":
echo bcadd("0,3","0,5",2);

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-23 14:13 UTC] hholzgra@php.net
locale settings should not affect the way code is parsed 
(it still does in some places of Zend Engine, but that is a different story)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 13:01:28 2024 UTC