develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #37526] multiple encodings causes "panic: sv_setpvn called with negative strlen"

Thread Next
From:
Jesse Luehrs via RT
Date:
July 6, 2012 15:02
Subject:
[perl #37526] multiple encodings causes "panic: sv_setpvn called with negative strlen"
Message ID:
rt-3.6.HEAD-28836-1341612114-787.37526-15-0@perl.org
In 5.16.0, this program:

  use encoding 'iso-8859-1';
  binmode STDOUT, ':encoding(iso-8859-1)' or die "binmode:$!";
  print "\xe1", "\n";

prints:

  "\x{fffd}" does not map to iso-8859-1 at test7.pl line 3.
  \x{fffd}

and changing the last line to:

  print "x\xe1", "\n";

yields:

  "\x{fffd}" does not map to iso-8859-1 at test7.pl line 3.
  x\x{fffd}

Is this the expected behavior? I'm not entirely sure why it would be
printing a literal '\x{fffd}'.

-doy

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=37526

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About