perl-unicode

binmode() and use open

2002-11-27 03:30:05
Hi,

Something I dont understand about the use of the open pragma with perl 8.0.
I want my CGI script to output utf-8 text, so I tried:

use open OUT => ':utf8';
use open ':std';

which I thought would declare a utf-8 layer for STDOUT as well as othe output 
filehandles. 
But my output seems to be in iso-8859-1.
If I use:

binmode(STDOUT, ":utf8");

it works as expected.

Gregor Chrupala
 

<Prev in Thread] Current Thread [Next in Thread>