Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

mod_perl2 and utf8

by jbert (Priest)
on Dec 23, 2009 at 17:04 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found