in reply to storable and utf8
$contents = decode_utf8($contents); is only correct if you erroneously did $contents = encode_utf8($contents); or equivalent to the frozen contents. You should remove the encoding rather than adding the decoding.