Branch: refs/heads/smoke-me/leont/less-fragile-encoding
  Home:   https://github.com/Perl/perl5
  Commit: a6bdbf33119343120782fbf2d51ca9db6763f455
      
https://github.com/Perl/perl5/commit/a6bdbf33119343120782fbf2d51ca9db6763f455
  Author: Leon Timmermans <faw...@gmail.com>
  Date:   2020-02-15 (Sat, 15 Feb 2020)

  Changed paths:
    M ext/PerlIO-encoding/encoding.pm
    M ext/PerlIO-encoding/encoding.xs

  Log Message:
  -----------
  Enforce STOP_AT_PARTIAL in $PerlIO::encoding::fallback

PerlIO::encoding has a $fallback variable that allows one to set the
behavior on a encoding/decoding error, for example to make it throw an
exception on error. What is not documented (actually the example in the
documentation is even missing this) is that PerlIO::encoding needs the
(equally undocumented) Encode::STOP_AT_PARTIAL flag to be set, otherwise
a multi-byte character spanning buffer boundaries will be interpreted as
two invalid byte sequences. I could have fixed the documentation, but
instead I fixed the code to always pass this flag to Encode, simplifying
the use and making the current documentation correct again.


  Commit: 7e95f4e28b96dad8d4ed27820e6606d7d9d7118b
      
https://github.com/Perl/perl5/commit/7e95f4e28b96dad8d4ed27820e6606d7d9d7118b
  Author: Leon Timmermans <faw...@gmail.com>
  Date:   2020-02-15 (Sat, 15 Feb 2020)

  Changed paths:
    M ext/PerlIO-encoding/encoding.xs

  Log Message:
  -----------
  Disallow coderef in $PerlIO::encoding::fallback

Encode allows one to pass a coderef instead of a set of flags to handle.
This however doesn't allow one to pass STOP_AT_PARTIAL, which means it
has always been buggy on buffer boundaries. With my new automatic
STOP_AT_PARTIAL passing this would result in an unpredictable value.
Instead we now disallow it in PerlIO::encoding.


  Commit: b46da45bff7337057591fed7c75b52ef1d3a3d00
      
https://github.com/Perl/perl5/commit/b46da45bff7337057591fed7c75b52ef1d3a3d00
  Author: Leon Timmermans <faw...@gmail.com>
  Date:   2020-02-15 (Sat, 15 Feb 2020)

  Changed paths:
    M ext/PerlIO-encoding/encoding.xs

  Log Message:
  -----------
  Don't add encode_stop_at_partial to e->chk prematurely


  Commit: a427ee7e3b9115b90b5377ac6b475e6b2cc7fc7e
      
https://github.com/Perl/perl5/commit/a427ee7e3b9115b90b5377ac6b475e6b2cc7fc7e
  Author: Leon Timmermans <faw...@gmail.com>
  Date:   2020-02-15 (Sat, 15 Feb 2020)

  Changed paths:
    M ext/PerlIO-encoding/encoding.xs

  Log Message:
  -----------
  WIP


Compare: https://github.com/Perl/perl5/compare/10a77bd9b452...a427ee7e3b91

Reply via email to