hno Posted August 2, 2011 Share Posted August 2, 2011 hi, I need to use strlen in my php website but the problem is strlen return different value for Arabic characters and English characters So for every Arabic character php returns 2 but in English it returns 1 . Is there anyway to separate English from Arabic?I need to know the real strlen for Both languages .How should I do that? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/243558-how-to-distinguish-arabic-character/ Share on other sites More sharing options...
btherl Posted August 2, 2011 Share Posted August 2, 2011 You can try http://php.net/manual/en/function.mb-strlen.php Make sure you specify the encoding. Quote Link to comment https://forums.phpfreaks.com/topic/243558-how-to-distinguish-arabic-character/#findComment-1250547 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.