Bug #65230 [Wfx->Csd]: setting locale randomly broken

From: Date: Sat, 06 Dec 2014 11:04:06 +0000
Subject: Bug #65230 [Wfx->Csd]: setting locale randomly broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188944@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65230&edit=1 ID: 65230 Updated by: ab@php.net Reported by: xrstf-misc at yahoo dot com Summary: setting locale randomly broken -Status: Wont fix +Status: Closed Type: Bug Package: *General Issues Operating System: Windows 7 x64 PHP Version: 5.5.0 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=1b4d5ad46a60401bb3db754b4ef6888a7285e637 Log: Fixed bug #65230 setting locale randomly broken Previous Comments: ------------------------------------------------------------------------ [2014-03-27 12:10:32] cpuidle at gmx dot de > You should really really rely on intl's NumberFormatter, way better and portable. That's all fine. The problem is that even the "internal" type casts like (string)3.1 honor the non-working locales. Either it gets a big warning in the docs or the default casting behaviour should be changed as it's borked anyway. Honestly (my 5c)- and even more so since it did apparently work before 5.3- it is one of the cases where PHP behaves entirely unpredictable from developer's perspective. ------------------------------------------------------------------------ [2014-03-27 11:13:15] pajoye@php.net It is somehow, not portable, not thread safe, etc. You should really really rely on intl's NumberFormatter, way better and portable. ------------------------------------------------------------------------ [2014-03-27 10:18:19] cpuidle at gmx dot de It would at least help if the behavior was properly documented in setlocale... ------------------------------------------------------------------------ [2014-03-27 09:54:22] ab@php.net Related To: Bug #66962 ------------------------------------------------------------------------ [2013-08-02 16:47:23] ab@php.net And after all, locale has such issues on any platform. The solution is to use intl or custom localization functionality. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65230 -- Edit this bug report at https://bugs.php.net/bug.php?id=65230&edit=1

« previous php.bugs (#188944) next »