is not right thing to do on (e.g. x86). Network order is also "right" for
X fonts.
p4raw-id: //depot/perl@7168
sub rep_S { 'C' }
-sub rep_D { 'S' }
+sub rep_D { 'n' }
-sub rep_M { ($_[0] > 255) ? 'S' : 'C' }
+sub rep_M { ($_[0] > 255) ? 'n' : 'C' }
sub representation
{
my $uni = '';
while (length($str))
{
- my $code = unpack('S',substr($str,0,2,''));
+ my $code = unpack('n',substr($str,0,2,'')) & 0xffff;
$uni .= chr($code);
}
$_[1] = $str if $chk;
last if ($chk);
$x = 0;
}
- $str .= pack('S',$x);
+ $str .= pack('n',$x);
}
$_[1] = $uni if $chk;
return $str;