in reply to Re^7: Processing an encoded file backwards (updated)
in thread Processing an encoded file backwards

> What Perl version?

'This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x64-multi-thread'

does it die?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re^8: Processing an encoded file backwards (updated)

Replies are listed 'Best First'.
Re^9: Processing an encoded file backwards (updated)
by choroba (Cardinal) on Jan 18, 2020 at 23:46 UTC
    Yes, with exit code 2.

    This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Will test on Linux tomorrow, but I doubt it's about the Perl version.

      Termux with 5.28 doesn't die.

      $ perl $VAR1 = "\x{3ddd}"; $VAR1 = ''; $VAR1 = "\x{fad8}"; $VAR1 = ''; $ perl -v This is perl 5, version 28, subversion 2 (v5.28.2) built for arm-android

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        Bot 5.30.0 and 5.30.1 in my termux for arm-android do die.
        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      neither 5.18 nor 5.28 in my Ubuntu VM do die.

      lanx@ubuntu14-large:~$ perlbrew use perl-5.28.0 lanx@ubuntu14-large:~$ perl use warnings; use strict; use Encode qw/decode/; use Data::Dump qw/dd/; dd decode('UTF-16-BE', "\x3D\xDD\xFA", Encode::FB_CROAK|Encode::LEAVE_ +SRC ); dd decode('UTF-16-BE', "\xFA", Encode::FB_CROAK|Encode::LEAVE_ +SRC ); dd decode('UTF-16-LE', "\xD8\xFA\xDD", Encode::FB_CROAK|Encode::LEAVE_ +SRC ); dd decode('UTF-16-LE', "\xDD", Encode::FB_CROAK|Encode::LEAVE_ +SRC); __END__ "\x{3DDD}" "" "\x{FAD8}" "" lanx@ubuntu14-large:~$ perl -v This is perl 5, version 28, subversion 0 (v5.28.0) built for x86_64-li +nux

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re^9: Processing an encoded file backwards
by haukex (Archbishop) on Jan 19, 2020 at 12:05 UTC

    Just a note on this subthread: Encode can be upgraded separately from Perl.

      Ah, OK. It's

      archperlEncode
      x86_64-linux-thread-multi5.26.13.01
      x86_64-linux-thread-multi5.31.83.02
      arm-android 5.30.13.01

      All of them die.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        OK,my versions span from 2.49 to 2.97, none dies.

        perl use Encode; print "$] : $Encode::VERSION"; __END__
        5.028002 : 2.97 5.028000 : 2.97 5.026002 : 2.88 5.024001 : 2.88 5.018002 : 2.49

        I suppose you installed something which has a newer Encode in its dependencies.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice