Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: mod_perl2 and utf8

by ikegami (Pope)
on Dec 23, 2009 at 18:35 UTC ( #814136=note: print w/replies, xml ) Need Help??


in reply to mod_perl2 and utf8

By the way,

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 } $r->print($str);
is the same as
utf8::upgrade($str); $r->print($str);

But as previously explained, the correct solution is

utf8::encode($str); $r->print($str);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814136]
help
Chatterbox?
[choroba]: Re: Modern Perl 4th Edition Perl Cookbook is a very bad cookbook, I wasn't able to finish any dish and the resulting meals were disgusting.
[Happy-the-monk]: Discipulus: why are you looking for a Danish monk?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-11-17 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?