From: Nicholas Clark Date: Wed, 9 Nov 2005 21:30:02 +0000 (+0000) Subject: I/O is UTF-8, not "UNICODE" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a45f1ba014589f25fbf825289b49af1c5cc4f3ee;p=p5sagit%2Fp5-mst-13.2.git I/O is UTF-8, not "UNICODE" p4raw-id: //depot/perl@26066 --- diff --git a/t/io/layers.t b/t/io/layers.t index 62f77e8..c399b2a 100644 --- a/t/io/layers.t +++ b/t/io/layers.t @@ -31,20 +31,20 @@ my $DOSISH = $^O =~ /^(?:MSWin32|os2|dos|NetWare|mint)$/ ? 1 : 0; $DOSISH = 1 if !$DOSISH and $^O =~ /^uwin/; my $NONSTDIO = exists $ENV{PERLIO} && $ENV{PERLIO} ne 'stdio' ? 1 : 0; my $FASTSTDIO = $Config{d_faststdio} && $Config{usefaststdio} ? 1 : 0; -my $UNICODE_STDIN; +my $UTF8_STDIN; if (${^UNICODE} & 1) { if (${^UNICODE} & 64) { # Conditional on the locale - $UNICODE_STDIN = ${^UTF8LOCALE}; + $UTF8_STDIN = ${^UTF8LOCALE}; } else { # Unconditional - $UNICODE_STDIN = 1; + $UTF8_STDIN = 1; } } else { - $UNICODE_STDIN = 0; + $UTF8_STDIN = 0; } my $NTEST = 44 - (($DOSISH || !$FASTSTDIO) ? 7 : 0) - ($DOSISH ? 5 : 0) - + $UNICODE_STDIN; + + $UTF8_STDIN; sub PerlIO::F_UTF8 () { 0x00008000 } # from perliol.h @@ -57,7 +57,7 @@ print <<__EOH__; # FASTSTDIO = $FASTSTDIO # UNICODE = ${^UNICODE} # UTF8LOCALE = ${^UTF8LOCALE} -# UNICODE_STDIN = $UNICODE_STDIN +# UTF8_STDIN = $UTF8_STDIN __EOH__ SKIP: { @@ -122,7 +122,7 @@ SKIP: { } check([ PerlIO::get_layers(STDIN) ], - $UNICODE_STDIN ? [ "stdio", "utf8" ] : [ "stdio" ], + $UTF8_STDIN ? [ "stdio", "utf8" ] : [ "stdio" ], "STDIN"); open(F, ">:crlf", "afile");