|  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: -
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: Unknown/Other Function
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

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jul 28 21:01:24 2021 UTC