in reply to can 'warn' but not 'print' wide character

Turns out there was an outstanding ticket for this, and it just got resolved.
  • Comment on Re: can 'warn' but not 'print' wide character

Replies are listed 'Best First'.
Re^2: can 'warn' but not 'print' wide character
by hbm (Hermit) on Sep 16, 2010 at 17:14 UTC

    What timing! Are you in on that bug system? I believe 'die' needs the same fix.

    This code from the bug report:

    perl -we '$a="\xee\n"; print STDERR $a; warn $a; utf8::upgrade($a); pr +int STDERR $a; warn $a'

    gives the same results as this:

    perl -we '$a="\xee\n"; print STDERR $a; die $a;' perl -we '$a="\xee\n"; utf8::upgrade($a); print STDERR $a; die $a'

    Thanks!

      I don't know if it was fixed by the same patches or by different patches, but die() will warn too in 5.14.

      $ ./perl -v This is perl 5, version 13, subversion 4 (v5.13.4-312-g6e4e365) built +for i686-linux ... $ ./perl -e'warn chr 300' Wide character in warn at -e line 1. Ĭ at -e line 1. $ ./perl -e'die chr 300' Wide character in die at -e line 1. Ĭ at -e line 1.