Bug #65769 [Opn->Csd]: localeconv() broken in TS builds
| From: | ab@php.net | Date: | Fri, 05 Dec 2014 10:10:29 +0000 |
| Subject: | Bug #65769 [Opn->Csd]: localeconv() broken in TS builds | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-188929@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65769&edit=1
ID: 65769
Updated by: ab@php.net
Reported by: christoph at ymail dot com
Summary: localeconv() broken in TS builds
-Status: Open
+Status: Closed
Type: Bug
Package: Strings related
Operating System: Windows 7 x64
PHP Version: 5.5.4
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7943f944c2646f71daf5feb9a0d2f84ec368c1c5
Log: Fixed bug #65769 localeconv() broken in TS builds
Previous Comments:
------------------------------------------------------------------------
[2014-11-21 13:17:08] ab@php.net
Related To: Bug #66265
------------------------------------------------------------------------
[2013-09-27 02:50:16] pajoye@php.net
It is not (always, there are many issues) Windows specific.
Locale are not TS, per se.
I'm not sure it is fixable (out of the PHP scope) and I would strongly suggest to
use INTL instead for any locale related operations, and not only because of these
bugs.
------------------------------------------------------------------------
[2013-09-26 21:32:17] aharvey@php.net
This appears to work as expected on Linux in both TS and NTS builds, so I'm
guessing this is Windows specific.
------------------------------------------------------------------------
[2013-09-26 15:09:32] christoph at ymail dot com
Description:
------------
I try to set the locale for my script on Windows. There is *no* webserver
involved, we're talking about running vanilla PHP binaries directly on the cmd.
Using the TS builds does not work, localeconv() returns empty data.
Using the NTS builds works fine.
Both PHP versions are 5.5.4, straight from windows.php.net. No changes to the
php.ini (in fact, there is no php.ini at all). There are no other PHP processes
running anywhere on my system.
I can see (even if I don't fully understand) problems using setlocale() in multu-
threaded webservers and stuff, but there is no multi-threading involved here.
Test script:
---------------
<?php
setlocale(LC_ALL, 'sve');
print_r(localeconv());
Expected result:
----------------
Array
(
[decimal_point] => ,
[thousands_sep] => Â
[int_curr_symbol] => SEK
[currency_symbol] => kr
[mon_decimal_point] => ,
[mon_thousands_sep] => .
[positive_sign] =>
[negative_sign] => -
[int_frac_digits] => 2
[frac_digits] => 2
[p_cs_precedes] => 0
[p_sep_by_space] => 1
[n_cs_precedes] => 0
[n_sep_by_space] => 1
[p_sign_posn] => 1
[n_sign_posn] => 1
[grouping] => Array
(
[0] => 3
)
[mon_grouping] => Array
(
[0] => 3
)
)
Actual result:
--------------
Array
(
[decimal_point] => .
[thousands_sep] =>
[int_curr_symbol] =>
[currency_symbol] =>
[mon_decimal_point] =>
[mon_thousands_sep] =>
[positive_sign] =>
[negative_sign] =>
[int_frac_digits] => 127
[frac_digits] => 127
[p_cs_precedes] => 127
[p_sep_by_space] => 127
[n_cs_precedes] => 127
[n_sep_by_space] => 127
[p_sign_posn] => 127
[n_sign_posn] => 127
[grouping] => Array
(
)
[mon_grouping] => Array
(
)
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65769&edit=1