#30159 [Bgs]: format_string does not use LC_NUMERIC

From: Date: Tue, 21 Sep 2004 22:17:20 +0000
Subject: #30159 [Bgs]: format_string does not use LC_NUMERIC
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66519@lists.php.net to get a copy of this message
 ID:               30159
 User updated by:  richard at hirner dot at
 Reported By:      richard at hirner dot at
 Status:           Bogus
 Bug Type:         *Languages/Translation
 Operating System: FreeBSD 5.2.1
 PHP Version:      4.3.7
 New Comment:

That's strange because all other locale things I use are working &
return expected results, including localeconv.
I do not know whether number_format SHOULD use locale settings or not,
can you give me a hint?


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

[2004-09-21 23:46:21] derick@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

Check the return value of setlocale(), I bet it\'s false because you
simply don\'t have the \"de\" locale.

------------------------------------------------------------------------

[2004-09-19 22:53:45] richard at hirner dot at

Description:
------------
One may expect number_format to behave localised and to use
mon_thousands_sep and mon_decimal_point from localeconv().

See bug 12647, but not only for decimal points but also for thousands
seperators.

Reproduce code:
---------------
setlocale(LC_ALL, "de");
print number_format(100000);

Expected result:
----------------
100.000

Actual result:
--------------
100,000


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30159&edit=1


Thread (5 messages)

« previous php.bugs (#66519) next »