Wow, I had to use someone’s custom unserialize code because PHP’s unserialize doesn’t quite work multi-byte strings. 🙁 Time wasted: 3 hours.
Here’s the function:
function mb_unserialize($serial_str) {
$out = preg_replace(‘!s:(\d+):”(.*?)”;!se’, ‘”s:”.strlen(“$2″).”:\”$2\”;”‘, $serial_str);
return unserialize($out);
}
$out = preg_replace(‘!s:(\d+):”(.*?)”;!se’, ‘”s:”.strlen(“$2″).”:\”$2\”;”‘, $serial_str);
return unserialize($out);
}