Am I doing something wrong or is this a bug:
use strict;
my $p;
foreach $p (qw (C U C))
{
my $s = pack($p, 200);
print "pack('$p', 200): is_utf8=" . (utf8::is_utf8($s) ? 'yes' : 'no ')
. "\t$s\t" . join(',', unpack('C*', $s)) . "\n";
}
Generates the following output:
pack('C', 200): is_ut
I run the following on an ebcdic platform
(perl-5.8.6),
$BOM = chr(0xFEFF);
open(UTF_PL, ">:raw:encoding(utf16le)", "utf.pl")
or die "utf.pl($enc,$tag): $!";
print UTF_PL $BOM;
print UTF_PL "1";
should the data that is written using PerlLIO_write,
be "\xFF \xFE \xF1" or should it be "\