in reply to storable and utf8
I found the source of my problem. I was adding the serialized data to a tar file via Archive::Tar->add_data. But I had missed the documentation in Archive::Tar that says:
Unicode strings need to be converted to UTF-8-encoded bytestrings before they are handed off to "add_data()":So this change on the serializer
- $tar->add_data($filename, $serialized_context, { type => Archive: +:Tar::FILE }); + $tar->add_data($filename, encode_utf8($serialized_context), { typ +e => Archive::Tar::FILE });
and this change on the de-serializer
- $self->serialized_blob($serialized_context); + $self->serialized_blob(decode_utf8($serialized_context));
make it all work as expected, and my original problem makes more sense now, though it's not much more than GIGO.
|
|---|