Andi Gutmans wrote: > Hi, > > I'll try and get the patch into PHP soon (I was busy with other things) > I want to rewrite it a bit to make it nicer.
does the case-sensitive, then case-insensitive logic really make that much sense? wouldn't it be easier *and* more consistent to make zend_str_tolower() not use libc tolower() but some locale-insensitive code instead? or am i missing something? btw, the use of strtod() within the engine is a similar problem the lexer always looks for '.' as decimal_point (which is right) but then uses strtod() to convert the found string into a double without taking in account that the decimal_point in the current locale may be a different character so that parsing stops at the '.', cutting off all decimals so strtod() should be replaced by something not locale-aware (and no, atof() is not what we are looking for) or replace the '.' with whatever decimal_point is set to in the current locale first solution would perform better, but from looking at the OpenBSD implementation of strtod() i think the second has far less potential for problems while not performing to bad if decimal_point is cached somehow ... PS: IMHO we have to rethink the complete set_locale() stuff in PHP as there is absolutely no way to make it work in threaded SAPIs :( -- Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de/ +49-711-99091-77 H.A.R.T.M.U.T.: Hydraulic Artificial Replicant Trained for Mathematics and Ultimate Troubleshooting -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php