in reply to Re: The module version works, but the standlone version crashes with "Malformed UTF-8 character"
in thread The module version works, but the standlone version crashes with "Malformed UTF-8 character"

The question is not why the standalone version does not work or where it doesn't work. If you delete blues/020d9511 it crashes immediately at next UTF-8 encoded file.
The question is why the standalone version does not work and the module version works without any problem, although the code is absolutely the same. What makes a module so different internally so that perl has a different interpretation in both cases? For me as a developer a particular code must always give the same result, but in this case I am really helpless.
  • Comment on Re^2: The module version works, but the standlone version crashes with "Malformed UTF-8 character"

Replies are listed 'Best First'.
Re^3: The module version works, but the standlone version crashes with "Malformed UTF-8 character"
by jo37 (Curate) on Mar 10, 2020 at 15:18 UTC

    Here I disagree. The input is malformed and a crashing program is the right thing™ here. I would not care why the other version does not crash but instead correct the input data.

    -jo