#18556 [Dup->Fbk]: Setting locale to 'tr_TR' lowercases class names
From: sniper@php.net Date: Thu, 29 Aug 2002 01:12:13 +0000 Subject: #18556 [Dup->Fbk]: Setting locale to 'tr_TR' lowercases class names References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-18101@lists.php.net to get a copy of this message
ID: 18556
Updated by: sniper@php.net
Reported By: spud@nothingness.org
-Status: Duplicate
+Status: Feedback
Bug Type: *Languages/Translation
Operating System: Linux (RedHat 7.2)
PHP Version: 4.2.2
Assigned To: hholzgra
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Something related to this was fixed in CVS. (the #16865 which this one
was marked duplicate of is closed)
Previous Comments:
------------------------------------------------------------------------
[2002-07-25 04:38:08] sniper@php.net
dup of #16865
------------------------------------------------------------------------
[2002-07-25 03:57:43] hholzgra@php.net
known problem, see regression test case tests/lang/035.phpt
------------------------------------------------------------------------
[2002-07-25 02:52:33] spud@nothingness.org
This bug is related to others submitted that refer to _constants_ being
affected by the locale change, but since this actually concerns a class
name, I wanted to submit it separately. Pardon the error if it turns
out to be one...
I'm internationalizing an app, which loads (include_once) a file called
'imc_Info.inc' containing two class definitions with their respective
constructors:
class Info
and
class InfoOracle
In the course of loading the index page, I call
new InfoOracle()
and perform a query. This works fine in English, Spanish, French, and
Greek. If I switch my app's locale to Turkish ('tr_TR'), however, I get
a error:
Cannot instantiate non-existent class: ?acle in /var/www/html
(Yes, that ? appears in my logs). After searching for bug reports
concerning Turkish, I noticed some closed/bogus reports that mentioned
_case_, so I did some poking around.
Although my class constructor clearly reads
function InfoOracle() {
blah blah blah
}
PHP fails to acknowledge it. The get_declared_classes() function DOES
return "info" and "infooracle" in its array though.
So I tried changing my call to
new infooracle(), simply lowercasing the whole name. That worked like a
charm, in Turkish. I noticed in one of the other bug reports that
Turkish contains no "I" in its character set, which _sort of_ explains
the problem, but it still strikes me as a bug. Shouldn't class names
remain unaffected by the current locale?
The following script demonstrates the problem. It generates the first
output, then throws an error attempting the second.
---- SCRIPT ----
<?
// Set language to desired language
$g_lang = 'tr_TR';
putenv("LANG=$g_lang");
setlocale(LC_ALL, $g_lang);
class InfoBlob {
var $foo;
function InfoBlob() {
$this->foo = "Foo";
}
}
echo ('Instantiating an infoBlob with a lowercase i<br>');
$foobar = new infoBlob();
echo ($foobar->foo);
echo ('<br>Instantiating an InfoBlob with an uppercase I<br>');
$foobar = new InfoBlob();
echo ($foobar->foo);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18556&edit=1
Thread (68 messages)
- Bug #18556 Updated: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 Updated: Setting locale to 'tr_TR' lowercases class names
- #18556 [Dup->Fbk]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Fbk->Ver]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Ver->Ctl]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Ctl->Csd]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Csd->Opn]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Opn->Asn]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Asn->Fbk]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- #18556 [NoF->Asn]: Setting locale to 'tr_TR' lowercases class names
- #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Asn]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Asn->Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Com]: Setting locale to 'tr_TR' lowercases class names
- Bug #18556 [Csd]: Setting locale to 'tr_TR' lowercases class names
| « previous | php.bugs (#18101) | next » |
|---|