} elsif ($country_language =~ /^zh_CN|chin(?:a|ese)?$/i) {
$locale_encoding = 'euc-cn';
} elsif ($country_language =~ /^zh_TW|taiwan(?:ese)?$/i) {
- $locale_encoding = 'big5';
+ $locale_encoding = 'euc-tw';
}
croak "Locale encoding 'euc' too ambiguous"
if $locale_encoding eq 'euc';
}
$std = 1;
} else {
- unless(PerlIO::Layer::->find($layer)) {
+ my $target = $layer; # the layer name itself
+ $target =~ s/^(\w+)\(.+\)$/$1/; # strip parameters
+
+ unless(PerlIO::Layer::->find($target)) {
carp("Unknown discipline layer '$layer'");
}
}
=back
+If your locale environment variables (LANGUAGE, LC_ALL, LC_CTYPE, LANG)
+contain the strings 'UTF-8' or 'UTF8' (case-insensitive matching),
+the default encoding of your STDIN, STDOUT, and STDERR, and of
+B<any subsequent file open>, is UTF-8.
+
Directory handles may also support disciplines in future.
=head1 NONPERLIO FUNCTIONALITY