Req #64367 [Opn]: localeconv() should respect ISO C99
| From: | cmb@php.net | Date: | Fri, 27 Aug 2021 09:26:18 +0000 |
| Subject: | Req #64367 [Opn]: localeconv() should respect ISO C99 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236111@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64367&edit=1
ID: 64367
Updated by: cmb@php.net
Reported by: abdevg at gmail dot com
Summary: localeconv() should respect ISO C99
Status: Open
Type: Feature/Change Request
-Package: Unknown/Other Function
+Package: Strings related
Operating System: Linux
PHP Version: 5.4.12
Block user comment: N
Private report: N
New Comment:
This feature request make sense wrt. feature parity with
localeconv(3), although NumberFormatter[1] might be the preferable
alternative for some time. Anyhow, if anybody is still interested
in this, I suggest to submit a pull request[2].
[1] <https://www.php.net/numberformatter>
[2] <https://github.com/php/php-src/pulls>
Previous Comments:
------------------------------------------------------------------------
[2013-03-06 08:41:00] abdevg at gmail dot com
Description:
------------
Locale data contain important information about currency formatting in fields
int_p_sep_by_space and int_n_sep_by_space.
C structure lconv contains such fields while PHP localeconv() doesn't return
them.
I've attached a patch but it probably should also contain something like #IFDEF
USE_ISOC99 (sorry, I am not a C developer)
Test script:
---------------
set_locale(LC_MONETARY, 'en_US.UTF-8');
$lc = localeconv();
print $lc['int_p_sep_by_space'];
Expected result:
----------------
1
Actual result:
--------------
PHP Notice: Undefined index: int_p_sep_by_space
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64367&edit=1