Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by vasanthgk91 (Sexton)
on May 15, 2013 at 07:13 UTC ( #1033623=note: print w/ replies, xml ) Need Help??


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

That is not a html entities..that is a tamil language content..when i paste in textarea It's look like that


Comment on Re^2: how to calculate the length for other language content in PERL?
Re^3: how to calculate the length for other language content in PERL?
by elavarasan (Acolyte) on May 15, 2013 at 07:20 UTC
    sorry vasanth!
Re^3: how to calculate the length for other language content in PERL?
by thomas895 (Hermit) on May 15, 2013 at 07:20 UTC

    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..."

      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..."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-07-05 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls