in reply to Re^4: Encoding horridness
in thread Encoding horridness

Yes, for example:
$_ = decode('utf-8', "\N{LATIN SMALL LETTER A WITH ACUTE}"); say encode('utf8', $_); # Replacement character EF +BFBD. say encode('utf8', decode('Latin-1', $_)); # Dies.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^6: Encoding horridness
by Anonymous Monk on Jul 12, 2017 at 17:55 UTC
    Fine. If the decode doesn't die, does it ever produce different output? (One might argue that call that dies doesn't produce any output, and therefore does not produce different output, but whatever.)