php.net |  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: -
Votes:1
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: abdevg at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-06 08:41 UTC] 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

Patches

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-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 15:01:29 2019 UTC