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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

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 09:03:33 2022 UTC