#17642 [Com]: setting certain locales undefines defines
| From: | eodabas at progen dot com dot tr | Date: | Tue, 19 Nov 2002 11:04:09 +0000 |
| Subject: | #17642 [Com]: setting certain locales undefines defines | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-25261@lists.php.net to get a copy of this message | ||
ID: 17642
Comment by: eodabas@progen.com.tr
Reported By: ilia@prohost.org
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.18
PHP Version: 4.2.1
New Comment:
just an information, there is an "I" letter in turkish, but the
lowercase of "I" is not "i" :)
Previous Comments:
------------------------------------------------------------------------
[2002-06-07 13:31:40] sniper@php.net
Please don't open new bug reports about exactly same issues,
especially when you don't have any new information / patches
for it..
http://bugs.php.net/bug.php?id=16865&edit=1
------------------------------------------------------------------------
[2002-06-07 11:47:25] ilia@prohost.org
I've looked the Zend constants code and it appears the code ALWAYS
lowercases the name of the define (not done for variables). To
lowercase the define name, C's tolower() function is used, which obides
by locale settings, since I is not avaliable it is left as is accoring
to the tolower()'s man page.
The solution which appears to work, seems to be the removal of
zend_str_tolower(lookup_name, name_len);
inside ZEND_API int zend_get_constant function and removal of
end_str_tolower(lowercase_name, c->name_len);
inside ZEND_API int zend_register_constant
------------------------------------------------------------------------
[2002-06-07 11:28:46] ilia@prohost.org
Yeah, that does appear to be the problem, any define containing the
letter 'I' gets broken after the local is exported.
Interestingly enough, if I move the define below the setlocale() lin,e
it begins to work fine. Also, this does not seem to be a problem for
variable names as they are unaffected by change in locale.
------------------------------------------------------------------------
[2002-06-07 11:14:40] derick@php.net
This is because the 'I' doesn't exist in tr_TR.
Derick
------------------------------------------------------------------------
[2002-06-07 11:03:10] ilia@prohost.org
One more thing, If i use the get_defined_constants() function to fetch
the list of all the defines, the __REQUEST_TIMESTAMP__ is always there
and always has the correct value in it.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/17642
--
Edit this bug report at http://bugs.php.net/?id=17642&edit=1