Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 ( [id://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?

Replies are listed 'Best First'.
Re^3: how to calculate the length for other language content in PERL?
by thomas895 (Deacon) 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..."
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!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found