locale bug from php4.3.0

From: Date: Mon, 24 Mar 2003 15:02:40 +0000
Subject: locale bug from php4.3.0
Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-95211@lists.php.net to get a copy of this message
Hi, just porting big 4.2.3 application to 4.3.2rc, I see something changed from 4.3.0 about locale settings. Before 4.3.0 locale was used to print out numbers in string format and to read numbers from string formats. I mean php uses the decimal delimiter definied in the locale settings. From 4.3.0 on, php uses the decimal delimiter from locale only to output numbers to strings, not when read numbers from strings. Why ? Every other language works the old pre 4.3.0 way. This way every serious application needs alot of work to run on php
=4.3.0!!!!
Please explain why this change was made. I saw in setlocale source in ext/standard/strings.c,
                            if ((lc.decimal_point)[0] != '.') {
                                       /* set locale back to C */
                                       setlocale(LC_NUMERIC, "C");
                               }
this sets LC_NUMERIC to C in every case I'm in Italy and here we use comma as decimal delimiter. bye Giuseppe -- ------------------------------------------------------- Giuseppe Tanzilli g.tanzilli@gruppocsf.com CSF Sistemi srl phone ++39 0775 7771 Via del Ciavattino Anagni FR Italy

Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
« previous php.dev (#95211) next »