Re: Deprecate setlocale?

From: Date: Wed, 01 Apr 2015 19:19:49 +0000
Subject: Re: Deprecate setlocale?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-85658@lists.php.net to get a copy of this message
On 1 April 2015 at 18:27, Marc Bennewitz <dev@mabe.berlin> wrote: > > Functionality not related to locale should not be effected by this global This is issue is that that the locale affects all of the C library that use it, which includes printf(); > -> The following bug reports are valid bugs and should be resolved > https://bugs.php.net/bug.php?id=59571 - breaks Imagick For Imagick, the issue is that a SVG string was being generated with something like: sprintf(svg, "pos: %f %f", x, y); When the locale is set to a locale that uses commas for the decimal point, this generates an invalid SVG string. I don't believe there is any possible work around for this. If you know of one, please can you say it? > Functionality not related to locale should not be effected by this global > Basic PHP functions should be possible to be TS and therefore should > ignoring such global configuration else it's impossible to have a TS > version of PHP The global is held by the C libraries, not in PHP code. And yes, the implication of that is that setlocale can not be thread safe. cheers Dan

« previous php.internals (#85658) next »