php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28596 problem with setlocale and hebrew
Submitted: 2004-06-01 01:00 UTC Modified: 2004-06-09 01:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: fixxxer at netvision dot net dot il Assigned:
Status: No Feedback Package: *Languages/Translation
PHP Version: 4.3.6 OS: win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 - 25 = ?
Subscribe to this entry?

 
 [2004-06-01 01:00 UTC] 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!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-01 08:16 UTC] derick@php.net
What does the call to setlocale() return? Was the locale sucesfully set?
 [2004-06-01 11:08 UTC] fixxxer at netvision dot net dot il
the locale was sucesfully set, and you can see it by using strftime()
the date returns is in hebrew.
the problem is only with the chars.
 [2004-06-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC