Bug #61082 [NEW]: localeconv() returns space with int_curr_symbol
| From: | leods92 at gmail dot com | Date: | Tue, 14 Feb 2012 14:20:47 +0000 |
| Subject: | Bug #61082 [NEW]: localeconv() returns space with int_curr_symbol | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-167497@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu
PHP version: 5.3.10
Package: I18N and L10N related
Bug Type: Bug
Bug description:localeconv() returns space with int_curr_symbol
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 bug report at https://bugs.php.net/bug.php?id=61082&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61082&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61082&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61082&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61082&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61082&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61082&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61082&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61082&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61082&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61082&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61082&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61082&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61082&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61082&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61082&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61082&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61082&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61082&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61082&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61082&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61082&r=mysqlcfg