in reply to Re^2: how to calculate the length for other language content in PERL?
in thread how to calculate the length for other language content in PERL?

Yes, I know that. I meant your string with all the ampersands -- those are HTML Entities. They represent those characters, but in order to get the actual characters, you need to decode that first.
This is where HTML::Entities comes in. Feed your string through decode_entities, and then do your thing with encode_guess, if needed still. The length of the output of decode_entities($title) is the string you should find the length of.

~Thomas~ 
"Excuse me for butting in, but I'm interrupt-driven..."

Replies are listed 'Best First'.
Re^4: how to calculate the length for other language content in PERL?
by vasanthgk91 (Sexton) on May 15, 2013 at 07:31 UTC

    thank u very much....

    use HTML::Entities; $title=decode_entities($title); my $title_length=length($title); $title=encode_entities($title);

    It's working

      I told you :-)

      ~Thomas~ 
      "Excuse me for butting in, but I'm interrupt-driven..."

        HTML decode_entities I used previously purpose for getting length in perl. But today I have problem for that length wrong for text area value receive. I receive the text value from param that length working properly but text area receive from param..It shows wrong length for me.

        Please give a suggestion