Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^14: somethign wrong with the sumbit

by Nik
on Jan 02, 2008 at 19:01 UTC ( #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.


Comment on Re^14: somethign wrong with the sumbit
Select or Download Code
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.

      First of all iam not a programmer and i dont have a boss that put me do this
      I do this on my spare time trying to make a simple website with perl

      I've been writing to this thread 3-4 days now, to finally understand whats going on and the 2 string wont match and you tell me this is one of code i need to add and you cant tell me what this lien is?

      I'm reading all your posts over and over to finally see the light and i still dont see why those string wont match
      Also i dont know how to tell perl to encode the returned form string to utf8 encoding because i have no idea what sort of string the browser is sending back to index.pl.

      Why are having endless conversations and i still aint able to understand whats wrong. Its not that iam not trying, i am. I couldnt run your script in the browser to be able to understand better and you didnt anser to my last post.

      I can and will write the line of code needed myself as long as i know what encoding is the string that is returned back from the browser. If i dont know its source encodign then how am i supposed to run this Encode::from_to($_, 'what encoding here?', 'utf-8') ?

        Encode::Guess?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-07-25 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls