php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52839 Wrong NumberFormatter::SPELLOUT for Russian language
Submitted: 2010-09-14 15:56 UTC Modified: 2010-09-14 16:26 UTC
From: rtmvnv at gmail dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: 5.3.3 OS: all
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:
25 - 2 = ?
Subscribe to this entry?

 
 [2010-09-14 15:56 UTC] rtmvnv at gmail dot com
Description:
------------
<?php
$fmt = new NumberFormatter("ru", NumberFormatter::SPELLOUT);
echo $fmt->format(1984);
?>

As a result we get "тысяча девять сто восемьдесят четыре" which is incorrect. Should be "тысяча девятьсот восемьдесят четыре".

Test script:
---------------
<?php
$fmt = new NumberFormatter("ru", NumberFormatter::SPELLOUT);
echo $fmt->format(1984);
?>

Expected result:
----------------
тысяча девятьсот восемьдесят четыре

Actual result:
--------------
тысяча девять сто восемьдесят четыре

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-14 16:26 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2010-09-14 16:26 UTC] aharvey@php.net
This looks to be dependent on the installed version of libicu: a libicu 3.8 installation results in "тысяча девять сто восемьдесят четыре", whereas libicu 4.2.1 results in "одна тысяча девятьсот восемьдесят четыре".

In short, it's an upstream bug that's been fixed, so the only useful advice I can offer is to upgrade libicu.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 15:03:33 2022 UTC