Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^14: somethign wrong with the sumbit

by Nik (Initiate)
on Jan 02, 2008 at 19:01 UTC ( [id://660034]=note: print w/replies, xml ) Need Help??


in reply to Re^13: somethign wrong with the sumbit
in thread somethign wrong with the sumbit

Your test cgi script is syntactically correct and it runs ok form the shell but i dont understand a thing, all i see is raw html data like the following that doesnt make any sense to me, i cant make it work to the browser though and dont understand why, its a mystery because the script is correct:
<option value="&#9580;&#959;&#9580;&#958;">&#9580;&#959;&#9580;&#958;< +/option> <option value="&#9580;&#9619;&#9575;&#914;">&#9580;&#9619;&#9575;&#914 +;</option>
In any case, the form data sent back to your server from the browser is determined by you when you create the form.
By that you mean that when i create the form i must explicitly tell perl what character set to be expecting as return form string by the browser? Isn't print header (-charset => 'utf-8') suppose to do this or i need something extra too?

OR perhaps you by that you mean

that, i'm responsible to switch the returned form string to encoding of my liking (utf-8) for example?

In other words, when you send a form to a browser, and the user clicks things on the form and submits it, the values sent back are exactly the parameter values that you provided in the form -- the browser is not supposed to do anything to change those values (not even anything like changing the character encoding); it just provides a way for the user to make selections, and it sends back the information you requested about those selections.
If the browser was sending back to my index.pl script exactly the same string the user selected before sumbitting the form(not altering it at any way) then WHY the strings ain't matching when i do this? unless ( grep { $_ eq param('select') } @display_files ) ????
Because the string before the user hits submit and the string returned after submission is NOT the same, that proves to us that the browser DOES ALTER the submitted data in some way although it shouldn't have done this? Isn't that anticanonical?

/because you said i needed a line i also tried to:

$article = decode('utf-8', param('select')); Encode::from_to($article, 'utf-8', 'ISO-8859-7') ; open FILE, "<$ENV{'DOCUMENT_ROOT'}/data/text/$article.txt" or die $ +!; local $/; $data = <FILE>; close FILE;
So to proper set the return browser string to utf8(i tried it like this so to avoid specifying the source encoding but rather only the ending one but it doesnt work though ) and then re-encode it to greek-iso since that's the encoded needed to open the file later.

Replies are listed 'Best First'.
Re^15: somethign wrong with the sumbit
by graff (Chancellor) on Jan 03, 2008 at 03:32 UTC
    I think it's time for you to get someone to do this job for you -- that is, someone who can talk to you face-to-face (possibly in Greek), and can login on your machine, and can understand what needs to be done.

    I cannot and will not do the job for you, and you are presenting yourself as being too dense, too helpless, and too unable or unwilling to find things out on your own. It's almost bordering on trollishness, and I can't spend any more time trying to teach you things that you should be learning without help from me or other PerlMonks.

    Face it: you are not a programmer. If you need to get some programming work done, you will need to find someone who knows how to do it, and you will most likely need to pay them to do it. If someone else is actually paying you to try to get this done, I think you should, in all honesty, quit this job. tell the boss to hire someone else more qualified, and go off to find yourself another job that is better suited to your skills, whatever they may be.

    The same applies to your other current thread, which is almost as long as this one now, where people have been trying in vain to teach you things that you seem incapable of learning. Give it up.

    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-03-28 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found