develooper Front page | perl.beginners | Postings from May 2007

Re: output with utf8

Thread Previous | Thread Next
From:
Jen mlists
Date:
May 16, 2007 01:30
Subject:
Re: output with utf8
Message ID:
fbe35f750705160129t1473912cjcd66aafa344e3f5@mail.gmail.com
Hello,

Does thie mean when I say,

 binmode(STDOUT, ":utf8");

The characters would be translated to utf8 for output automatically?
(Would I need to translate them to utf8 firstly before output?)

Thanks again.


2007/5/16, Jeff Pang <pangj@gmx.net>:
> Jen mlists 写道:
> > Hello,
> >
> > I need to output contents with utf8 encoding in CGI scripts.
> > Can you tell me how to open STDOUT with utf8 support?Thanks you.
> >
> Hello,
>
> Just do,
> binmode(STDOUT, ":utf8");
>
> see "perldoc perluniintro" for more details.
>
> --
> Jeff Pang
> http://home.arcor.de/jeffpang/
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About