#28596 [Opn->Fbk]: problem with setlocale and hebrew

From: Date: Tue, 01 Jun 2004 06:16:11 +0000
Subject: #28596 [Opn->Fbk]: problem with setlocale and hebrew
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60236@lists.php.net to get a copy of this message
ID: 28596 Updated by: derick@php.net Reported By: fixxxer at netvision dot net dot il -Status: Open +Status: Feedback Bug Type: *Languages/Translation Operating System: win2000 PHP Version: 4.3.6 New Comment: What does the call to setlocale() return? Was the locale sucesfully set? Previous Comments: ------------------------------------------------------------------------ [2004-06-01 01:00:38] fixxxer at netvision dot net dot il Description: ------------ to check if setlocale (LC_ALL,"hebrew") works i tried printing the date in hebrew as well. the problem is wierd. the date is in hebrew, but regex still having problems with the hebrew. \w that suppose if the text contains legal chars (and _) works perfectly with english but makes problems with hebrew. if i ain't using setlocale he thinks that "÷" is not a char. if i do use setlocale he thinks that about all the hebrew letters. Reproduce code: --------------- <?php setlocale (LC_ALL,"hebrew"); $long_date = strftime("%A, %d %B %Y"); echo $long_date . "<br />"; $str = "òáøéú"; if (preg_match('/[^\w\s\-\.\@]/i',$str)) { print "wrong!"; } ?> Expected result: ---------------- éåí ùìéùé, 01 éåðé 2004 Actual result: -------------- éåí ùìéùé, 01 éåðé 2004 wrong! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28596&edit=1

« previous php.bugs (#60236) next »