Edit report at https://bugs.php.net/bug.php?id=53735&edit=1

 ID:                 53735
 Comment by:         bghome at gmail dot com
 Reported by:        mortenskyt at gmail dot com
 Summary:            NumberFormatter returns NaN when converting float
                     point
 Status:             Open
 Type:               Bug
 Package:            I18N and L10N related
 Operating System:   MacOS X 10.6.6
 PHP Version:        5.3.5
 Block user comment: N
 Private report:     N

 New Comment:

I can reproduce this with PHP 5.3.10 on Ubuntu 12.04 64.
It is strange for me, because running from CLI works as expected.

Code to run:
$f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%');
echo $f->format(0.26) . "\n";


Previous Comments:
------------------------------------------------------------------------
[2012-05-24 09:59:00] arthur_jambon at prizee dot fr

Get always NaN with NumberFormatter::ORDINAL if the current local is not en_US.

PHP 5.3.3
ICU lib 4.4.1-8
OS Debian Squeeze

------------------------------------------------------------------------
[2011-10-07 10:46:40] martin at tajur dot ee

The exact same thing happens on all Debian Squeeze installations, given that 
php5-
intl bundle is installed from the default debian package sources. The error 
appears right after switching locale to something other than default ("en", 
presumably) and trying to format a number with a comma using NumberFormatter. I 
was able to fix the issue on Debian Lenny by manually downgrading ICU library 
to 
3.8 but ICU 3.8 does not work on Squeeze which raises importance of this issue 
even more.

------------------------------------------------------------------------
[2011-01-24 01:36:31] s...@php.net

I works for me with ICU 4.3.4. Maybe they broke something in 4.6... 
May be related to this ticket: http://bugs.icu-project.org/trac/ticket/6711

------------------------------------------------------------------------
[2011-01-22 13:40:59] mortenskyt at gmail dot com

Hello again,

On my Mac with PHP 5.3.5 from Macports:

Internationalization support => enabled
version => 1.1.0
ICU version => 4.6

(same version on non-working FreeBSD PHP 5.3.4-machine)


The FreeBSD-machine with PHP 5.3.3, which works with no issues:

Internationalization support => enabled
version => 1.0.3
ICU version => 3.8.1

------------------------------------------------------------------------
[2011-01-22 08:41:40] s...@php.net

Works for me in 5.3 on Mac OS X. Which ICU version do you have (check 
phpinfo())?

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=53735


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

Reply via email to