Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-10-29 Thread Alec Smecher
Hi all, On 27/10/12 12:49 PM, Lars Strojny wrote: Hi, thanks for bringing this up again. I digged even deeper into the whole issue of converting floats to strings and my current findings are that we can’t solve that consistently as things are already fubar’ed. The reason for that is, that in

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-10-27 Thread Stas Malyshev
Hi! Excuse my persistence. There must be a fix for this at the PHP level that's palatable to you folks... I'd suggest talking directly to PGSQL maintainers... In general, the pull seems to be fine to me, but I'd rather have the people that understand something in PGSQL APIs look at it :) --

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-10-27 Thread Lars Strojny
Hi, thanks for bringing this up again. I digged even deeper into the whole issue of converting floats to strings and my current findings are that we can’t solve that consistently as things are already fubar’ed. The reason for that is, that in order to solve this issue we would need to make

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-10-26 Thread Alec Smecher
On 26/09/12 04:02 PM, Alec Smecher wrote: On 20/09/12 12:02 PM, Alec Smecher wrote: It looks to me like a textbook use case of pg_query_params will currently fail depending on what locale is being used. What Claude at https://bugs.php.net/bug.php?id=46408#1334753071 and Lars here are trying

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-26 Thread Alec Smecher
On 20/09/12 12:02 PM, Alec Smecher wrote: It looks to me like a textbook use case of pg_query_params will currently fail depending on what locale is being used. What Claude at https://bugs.php.net/bug.php?id=46408#1334753071 and Lars here are trying to do is make it a general fix, which is

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-20 Thread Stas Malyshev
Hi! I'm currently working on https://github.com/php/php-src/pull/186, which fixes a problem with PostgreSQL when passing a float to pg_query_params() with a locale setting that uses , as a decimal point. pg_query_params() uses convert_to_string(), which uses %G as a format string for floats,

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-20 Thread Stas Malyshev
Hi! Quick follow-up, PDO::quote() and mysqli::real_escape_string() suffer from the same issue. Why would you feed doubles to escape_sting functions? I don't think it's the right thing to do. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-20 Thread Pierre Joye
hi Lars, On Wed, Sep 19, 2012 at 8:35 PM, Lars Strojny l...@strojny.net wrote: I'm currently working on https://github.com/php/php-src/pull/186, which fixes a problem with PostgreSQL when passing a float to pg_query_params() with a locale setting that uses , as a decimal point.

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-20 Thread Alec Smecher
Hi all, On Wed, Sep 19, 2012 at 8:35 PM, Lars Strojnyl...@strojny.net wrote: I'm currently working onhttps://github.com/php/php-src/pull/186, which fixes a \ problem with PostgreSQL when passing a float to pg_query_params() with a locale \ setting that uses , as a decimal point.

[PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-19 Thread Lars Strojny
Hi everybody, I'm currently working on https://github.com/php/php-src/pull/186, which fixes a problem with PostgreSQL when passing a float to pg_query_params() with a locale setting that uses , as a decimal point. pg_query_params() uses convert_to_string(), which uses %G as a format string for

Re: [PHP-DEV] PR 186: external protocols and locale independent string conversion

2012-09-19 Thread Lars Strojny
Hi, Am 19.09.2012 um 20:35 schrieb Lars Strojny l...@strojny.net: [...] This kind of fix is very likely needed in other places, where floats are converted using convert_to_string(). I haven’t found time to try e.g. mysqlnd, but I suspect we’ll find similar issues there. I don’t think the