#28596 [NEW]: problem with setlocale and hebrew

From: Date: Mon, 31 May 2004 23:00:40 +0000
Subject: #28596 [NEW]: problem with setlocale and hebrew
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60224@lists.php.net to get a copy of this message
From: fixxxer at netvision dot net dot il Operating system: win2000 PHP version: 4.3.6 PHP Bug Type: *Languages/Translation Bug description: problem with setlocale and hebrew 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 bug report at http://bugs.php.net/?id=28596&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28596&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28596&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28596&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28596&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28596&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28596&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28596&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28596&r=support Expected behavior: http://bugs.php.net/fix.php?id=28596&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28596&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28596&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28596&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28596&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28596&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28596&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28596&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28596&r=float

« previous php.bugs (#60224) next »