[wp-trac] Re: [WordPress Trac] #6532: db collation and db charset
break serialize and unserialize on some sites
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 15 11:35:04 GMT 2009
#6532: db collation and db charset break serialize and unserialize on some sites
--------------------------+-------------------------------------------------
Reporter: tandilboy | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.9
Component: General | Version: 2.5
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+-------------------------------------------------
Changes (by Denis-de-Bernardy):
* keywords: => dev-feedback
Comment:
No no, it's charset-related all right. I've seen this happen often enough
to know, and I ran into the "real" issue while investigating this in a
separate app.
unserialize() uses strlen() to determine the length of strings, and
strlen() occasionally outputs erroneous string lengths when using
multibyte characters. Trying to overload strlen() using the ini setup is
hopeless to make it mb safe, because unserialize() will still use,
internally, the non-mb safe version of strlen().
If my memory serves me well the php devs have no intention to fix it. So I
resolved (in the other app) to never serialize anything that may contain
captions or user-editable text.
This means that fixing the text widget (and all sorts of other plugins,
widgets, meta options, etc.) would mean introducing separate options to
store user-editable text, rather than storing them within an array.
--
Ticket URL: <http://trac.wordpress.org/ticket/6532#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list