Bug #61082 [Opn->Nab]: localeconv() returns space with int_curr_symbol
| From: | aharvey@php.net | Date: | Wed, 15 Feb 2012 00:15:00 +0000 |
| Subject: | Bug #61082 [Opn->Nab]: localeconv() returns space with int_curr_symbol | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167522@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61082&edit=1
ID: 61082
Updated by: aharvey@php.net
Reported by: leods92 at gmail dot com
Summary: localeconv() returns space with int_curr_symbol
-Status: Open
+Status: Not a bug
Type: Bug
Package: I18N and L10N related
Operating System: Ubuntu
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
Thanks for the report. PHP just returns whatever the system's localeconv()
provides, so if there's an unexpected space, that's coming from Ubuntu's locale
database and needs to be reported to them.
Previous Comments:
------------------------------------------------------------------------
[2012-02-14 14:20:46] leods92 at gmail dot com
Description:
------------
The function localeconv() returns an array and one of its keys is
'int_curr_symbol' what I expected to return the international currency symbol
(e.g. USD (US dollar), BRL (Brazilian real)).
I develop in a Windows environment and deploy to a Ubuntu machine and that's why
I'm not sure if this is a bug of PHP, bad implementation of standards by Windows
or Ubuntu or an undocumented difference.
The returned int_curr_symbol from the Ubuntu machine contains an extra space at
the end but the one from Windows doesn't. Researching online all I found were old
specification documents. Correct me if I am wrong but from what I understood from
some documents adding a space to the int_curr_symbol is deprecated.
Test script:
---------------
<?php
setlocale(LC_MONETARY, 'en_US');
$x = localeconv();
echo $x['int_curr_symbol'];
?>
Expected result:
----------------
$x['int_curr_symbol'] should output 'USD'.
Actual result:
--------------
$x['int_curr_symbol'] should outputs 'USD '.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61082&edit=1