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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to