|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64367 localeconv() should respect ISO C99
Submitted: 2013-03-06 08:41 UTC Modified: 2021-08-27 09:26 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: abdevg at gmail dot com Assigned:
Status: Open Package: Strings related
PHP Version: 5.4.12 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-03-06 08:41 UTC] abdevg at gmail dot com
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 

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:

Actual result:
PHP Notice:  Undefined index: int_p_sep_by_space


localeconv_isoc99_patch (last revision 2013-03-06 08:42 UTC by abdevg at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-27 09:26 UTC]
-Package: Unknown/Other Function +Package: Strings related
 [2021-08-27 09:26 UTC]
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] <>
[2] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 19:01:33 2024 UTC