You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Cristina Nunes <nu...@gmail.com> on 2007/07/11 11:42:34 UTC
UTF-8 in mod_perl
Hi.
I was wondering how I could set the mod_perl (1.x) STDOUT (and STDERR)
to expect utf8 char encoding?
In perlrun, you can just set it by using -CS parameter, ie, `perl -CS
-le 'print "olé"'`, or at runtime binmode(STDOUT, ":utf8");
Thanks,
Cristina
--
<Alanna> Saying that Java is nice because it works on all OS's is like
saying that anal sex is nice because it works on all genders
Re: UTF-8 in mod_perl
Posted by Foo JH <jh...@extracktor.com>.
You will want to do 2 things:
1. Set the content type to utf8 ($r->content_type)
2. Encode your output to utf8 (if it's not done already. Sometimes it's
just latin1)
Cristina Nunes wrote:
> Hi.
>
> I was wondering how I could set the mod_perl (1.x) STDOUT (and STDERR)
> to expect utf8 char encoding?
>
> In perlrun, you can just set it by using -CS parameter, ie, `perl -CS
> -le 'print "olé"'`, or at runtime binmode(STDOUT, ":utf8");
>
> Thanks,
> Cristina
>