>
> But it returns out put as : The string input: தமிள் and its length:5
> Now I want to have the out put as 3 but not as 5, how to achieve that?
>

தமிள் [sic] is made up of 5  Unicode code points.

Tamil Letter TA, Tamil Letter MA, Tamil Vowel Sign i, Tamil Letter LA, Tamil
Sign Virama.

So the output is technically correct.

You have to some logical manipulation, to count the syllables instead of
Unicode Code point.

V


2010/11/23 రహ్మానుద్దీన్ షేక్ <[email protected]>

> I have this code in php to read the length of a string in utf-8,
>
> <?php
>  header("Content-Type: text/html; charset=utf-8");
>  $a = "தமிள்";
>  $c = strlen(utf8_decode($a));
>  echo "The string input: ".$a." and its length:".$c;
> ?>
>
>
> Thanks & Regards
> Rahimanuddin Shaik
> నాని
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>



-- 
http://www.virtualvinodh.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to