Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: HTML Form > PERL Script in UTF-8 issue

by Jishanator (Initiate)
on Aug 30, 2012 at 20:24 UTC ( #990844=note: print w/ replies, xml ) Need Help??


in reply to Re^2: HTML Form > PERL Script in UTF-8 issue
in thread HTML Form > PERL Script in UTF-8 issue

HTML Form = Saved as UTF-8 File. Post > form.pl

In a required file, I set binmode (STDOUT, "utf8"); Then from the form.pl, I call a require that goes through a foreach loop that does this:

#!/usr/bin/perl use Encode; foreach $field (@fields) { $input{$field} = Encode::decode('UTF-8', $input{$field}); }

From form.pl, information is printed out to the user for them to confirm, when submitted, we move to form2.pl.

form2.pl outputs everything into an external file.. which then concludes to success.pl which pulls the information from the external file and displays it one last time in a sort of "receipt" manner, for them to print or save.

So to summarize the process, HTML Form > form.pl (converts through foreach to utf8) > form2.pl > success.pl (converts through foreach again). If for example, form.pl doesn't convert, the information is all different in success. I'm afraid this might bite me in the ass in a later stage.

I posted this, forgot to login...


Comment on Re^3: HTML Form > PERL Script in UTF-8 issue
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-08-20 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (125 votes), past polls