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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rtmvnv at gmail dot com
New email:
PHP Version: OS:

 

 [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: Wed Dec 11 15:01:30 2024 UTC