PERL_UNICODE environment variable

[email protected] ("Jonathan Warden")
Newsgroups perl.unicode
Message-ID <[email protected]>
As I understand it, the -CSD commandline option should add UTF8 to the
PerlIO layers for all file streams.  But it seems only to be applying it to
STDIN and STDOUT, and not other streams.

Anyone know what's going on?

  my $file = new IO::File($filename) or die "Error opening delimited file
$filename";
  my @layers = PerlIO::get_layers($file);
  my @layers2 = PerlIO::get_layers(\*STDOUT);
  print "Layers: ".Dumper(\@layers,\@layers2);

>perl -CSD test.pl

Output:

Layers: $VAR1 = [
          'unix',
          'crlf'
        ];
$VAR2 = [
          'unix',
          'crlf',
          'utf8'
        ];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.