Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
The stupid question is the question not asked
 
PerlMonks  

mod_perl2 and utf8

by jbert (Priest)
on Dec 23, 2009 at 17:04 UTC ( #814129=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    binmode STDOUT, ':utf8';
    my $strA = "Bob\x{B4}s files";
    ...
    say "strings are " . (($strA eq $strB) ? "eq" : "not eq");
    say "strA flag is: ".Encode::is_utf8($strA);
    say "strB flag is: ".Encode::is_utf8($strB);
    
  2. or download this
      if (!Encode::is_utf8($str) && $str =~ m/\x80-\xff/) {
        $str = Encode::encode_utf8($str); # Get utf8 byte seq
        Encode::_utf8_on($str);           # and flip the flag
      }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-04-19 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls