Is PHP serialize function compatible UTF-8 ?
Posted
by Matthieu
on Stack Overflow
See other posts from Stack Overflow
or by Matthieu
Published on 2010-03-30T07:43:46Z
Indexed on
2010/03/30
7:53 UTC
Read the original article
Hit count: 623
I have a site I want to migrate from ISO to UTF-8.
I have a record in database indexed by the following primary key :
s:22:"Informations générales";
The problem is, now (with UTF-8), when I serialize the string, I get :
s:24:"Informations générales";
(notice the size of the string is now the number of bytes, not string length)
So this is not compatible with non-utf8 previous records !
Did I do something wrong ? How could I fix this ?
Thanks
© Stack Overflow or respective owner