Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by philiprbrenan (Monk)
on Aug 29, 2012 at 20:35 UTC ( #990558=note: print w/ replies, xml ) Need Help??


in reply to HTML Form > PERL Script in UTF-8 issue

I think you will find it much easier if you convert all your non latin text to &#xnnnn; format which your browser will understand, yet uses only standard Latin characters.

sub htmlX($) # Convert to Html &#xnnnn; notation {my ($s) = @_; my $t = ''; $t .= (ord($_) < 128 ? $_ : sprintf("&#x%04x;", ord($_))) for split( +//, $s); $t }

You might also find this web page helpful: http://www.rishida.net/tools/conversion/


Comment on Re: HTML Form > PERL Script in UTF-8 issue
Download Code
Re^2: HTML Form > PERL Script in UTF-8 issue
by Anonymous Monk on Aug 30, 2012 at 03:35 UTC

    CGI.pm will gladly do that proper if you specify a charset

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2014-10-01 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls