|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rtmvnv at gmail dot com
New email:
PHP Version: OS:


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

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

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

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-14 16:26 UTC]
-Status: Open +Status: Bogus
 [2010-09-14 16:26 UTC]
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-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 02:01:27 2024 UTC