#39993 [Fbk->Asn]: tr_TR.UTF-8 locale has problems with PHP

From: Date: Sat, 30 Dec 2006 23:08:24 +0000
Subject: #39993 [Fbk->Asn]: tr_TR.UTF-8 locale has problems with PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107053@lists.php.net to get a copy of this message
 ID:               39993
 Updated by:       tony2001@php.net
 Reported By:      tunix at raptiye dot org
-Status:           Feedback
+Status:           Assigned
 Bug Type:         *Unicode Issues
 Operating System: Arch Linux
 PHP Version:      5.2.0
-Assigned To:      
+Assigned To:      derick
 New Comment:

Its is reproducible with the snapshot.
I believe this happens because of strcasecmp() (used in
seek_to_tz_position()) behaving weird with tr_TR locale (I remember
some similar problems in the past), using something like tolower() &
memcmp() should do the trick.


Previous Comments:
------------------------------------------------------------------------

[2006-12-30 20:46:30] derick@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

------------------------------------------------------------------------

[2006-12-30 18:22:08] tunix at raptiye dot org

Description:
------------
I type

<?php echo date("l"); ?>

into an empty php file and then run it in command line prompt, and it
prints this error message:

Fatal error: date(): Timezone database is corrupt - this should *never*
happen! in Command line code on line 1

If I use tr_TR.UTF-8 locale, then I can produce this error. But if I
use tr_TR.ISO8859-9 or C locales, it doesn't print the error message.
Although, tr_TR.ISO8859-9 and C locales return Saturday which is
English. It should return "Cumartesi" (turkish).

GNU date command works fine with UTF-8 locale.

[19:07] (tunix@penguix ~)$ TZ=Europe/Istanbul LANG=tr_TR.UTF-8 date
+%A
Cumartesi

Reproduce code:
---------------
[19:06] (tunix@penguix ~)$ TZ=Europe/Istanbul LANG=tr_TR.UTF-8 php -r
‘date(”l”);’

Fatal error: date(): Timezone database is corrupt - this should *never*
happen! in Command line code on line 1


Expected result:
----------------
It's supposed to be:

[19:06] (tunix@penguix ~)$ TZ=Europe/Istanbul LANG=tr_TR.UTF-8 php -r
‘date(”l”);’

Cumartesi





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39993&edit=1


Thread (6 messages)

« previous php.bugs (#107053) next »