|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-04 08:39 UTC] ab@php.net
-Status: Open
+Status: Not a bug
[2015-03-04 08:39 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 00:00:02 2025 UTC |
Description: ------------ Hi! I got a problem with my PHP 5.5.12 which I got with WAMP Server. PROBLEM: When I want to return the length of an Arabic string value it is not showing the exact length of the characters I wrote in that string PHP is increasing the length. Test script: --------------- header('Content-Type: text/html; charset=utf-8;'); // demo string by Pashto language $myText = "دا يوه جمله ده"; // length of the string above is 14 characters // you can test it with JavaScript in your browser console // and that is returning the exact length 14 but in PHP // it is showing 25 echo strlen( $myText ); // 25 // I also tested it with var_dump( $myText ); // string 'دا يوه جمله ده' (length=25)