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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC