Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: language Decoding problem..?

by farang (Chaplain)
on May 17, 2013 at 17:02 UTC ( #1033993=note: print w/ replies, xml ) Need Help??


in reply to language Decoding problem..?

I think you may want to first decode the HTML and then encode the string as UTF-8.

use strict; use warnings; use HTML::Entities; use Encode 'encode'; my $titlenamefromindex=q{ஸ்ரீசா&#x +BA8;்த், சவான், &#xB9 +A;ண்டிலா ஆகி&#x +BAF;ோர் தங்களத& +#xBC1; குற்றங்க&#xBB3 +;ை ஒப்புக் க&#x +BCA;ண்டதாக தகவ& +#xBB2;&#xBCD}; $titlenamefromindex = decode_entities($titlenamefromindex); print encode('UTF-8', $titlenamefromindex ), "\n";

Output:
ஸ்ரீசாந்த், சவான், சண்டிலா ஆகியோர் தங்களது குற்றங்களை ஒப்புக் கொண்டதாக தகவல்


Comment on Re: language Decoding problem..?
Download Code
Re^2: language Decoding problem..?
by vasanthgk91 (Sexton) on May 18, 2013 at 06:40 UTC

    thank u

    use HTML::Entities; use Encode; my $title_checking=$cgi->param("title_checking"); $title_checking=decode_entities($title_checking); $title_checking=encode('UTF-8',$title_checking); $title_checking=$prl->trim($title_checking); print "$title_checking";

    It's working...In my server I stored this format value then compare it's working..great thanks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2015-07-07 16:01 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 (91 votes), past polls