Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: language Decoding problem..?

by vasanthgk91 (Sexton)
on May 17, 2013 at 11:06 UTC ( #1033961=note: print w/replies, xml ) Need Help??

in reply to Re: language Decoding problem..?
in thread language Decoding problem..?

In header section I used properly Meta content

<meta http-equiv=\"content-type\" content=\"text/ html; charset=UT +F-8\">

In form section also i used properly utf-8

<form accept-charset=\"utf-8\"></form>

Next page param receiving

my $title_checking=$cgi->param("title_checking"); print "$title_checking";

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

Replies are listed 'Best First'.
Re^3: language Decoding problem..?
by space_monk (Chaplain) on May 17, 2013 at 14:01 UTC
    I suggest just to be sure you walk along each character to find the difference. Something like this:
    # there are probably better ways of doing a string diff... my ($s1, $s2) = ($title_checking, $titlenamefromindex); for (my $i = 0; i < length( $s1); $i++) { print "Different at $i\n" if (substr( $s1, $i, 1) ne substr( $s2, $ +i, 1); }
    (You may need to make minor fixes to above)
    If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033961]
[ovedpo15]: consider the following format of strings: some_data-doesn't- matter,value. how I get the value with regex? it should be after the last comma (last string)
[Corion]: Text::CSV_XS for all your CSV file parsing needs. Other than that, what problems do you have with perlre, and capturing everything after the comma? Also, index and substr would also work.
[choroba]: my ($value) = $string =~ /.*,(.*)/
[choroba]: The .* at the beginning matches the longest possible substring, so it eats any previous commas
[choroba]: But for CSV, use appropriate modules

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2018-05-27 08:50 GMT
Find Nodes?
    Voting Booth?