<div dir="ltr">Zend operates out of some pretty swank offices in Ramat Gan. So I doubt the PHP core team would be able to get very far without keeping some kind of Hebrew support. <div><br><br><div class="gmail_quote">2009/8/4 Yuval Hager <span dir="ltr"><<a href="mailto:yuval@avramzon.net">yuval@avramzon.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Let's try some regex matching in PHP.<br>
,----<br>
| php > echo preg_match('/\w/', 'a');<br>
| 1<br>
`----<br>
<br>
ok, so the basic stuff works in English. Let's go on.<br>
<br>
,----<br>
| php > echo preg_match("/\w/", 'א');<br>
| 0<br>
| php > echo preg_match('/\w/u', 'א');<br>
| 0<br>
`----<br>
<br>
Oops.. maybe some kind of encoding issue? My whole system is UTF8, so this<br>
should not be a problem I guess..<br>
,----<br>
| php > var_dump('א');<br>
| string(2) "א"<br>
`----<br>
<br>
So I revert to the soon-to-be-deprecated mb_ereg:<br>
<br>
,----<br>
| php > mb_regex_encoding('UTF-8');<br>
| php > echo mb_ereg('\w', 'א');<br>
| 1<br>
`----<br>
<br>
and now it works..<br>
<br>
maybe I was wrong expecting preg_match would know hebrew alphanumeric<br>
characters in the first place? I understand it will for PHP6, but until<br>
then, beware of sophisticated Hebrew string parsing.<br>
<font color="#888888"><br>
--yuval<br>
</font><br>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>There must be a beginning of any great matter, but the continuing unto the end until it be thoroughly finished yields the true glory. -- Sir Francis Drake<br>
</div></div>