In my database I have a serialized string containing this data: Boy’s
, the character ’ is a 3-byte character, causing the serialized string to look like: s:7:"Boy’s"
, however, when I get it in PHP it says Boy?s
, which is only 5 characters long - making the serialized string wrong.
Is there a way I, on the output, can convert the ? to a ’ in the string to resolve the unserialize problem?
The dataformat in the Database is utf8mb4_unicode_ci and cannot be changed.
I have tried, and figure the problem lies somewhere around a, utf8_decode or utf8_encode, but I cannot seem to make it work
I hope some of you can answer my problem