|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-26 21:32 UTC] aharvey@php.net
-Package: *General Issues
+Package: Strings related
[2013-09-26 21:32 UTC] aharvey@php.net
[2013-09-27 02:50 UTC] pajoye@php.net
[2014-12-05 10:10 UTC] ab@php.net
[2014-12-05 10:10 UTC] ab@php.net
-Status: Open
+Status: Closed
[2014-12-06 20:49 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
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 ( ) )