this is just a complete shot in the dark, but might this decoding failure have something to do with
$isutf()'s current inability to detect invalid UTF-8:
//echo -a $isutf($chr(0221) $+ $chr(0181) $+ $chr(0240) $+ 111)
= 2, whereas we would expect it to = 0