[wp-trac] [WordPress Trac] #25259: Helper functions for mbstring.func_overload
WordPress Trac
noreply at wordpress.org
Mon Sep 9 01:50:19 UTC 2013
#25259: Helper functions for mbstring.func_overload
--------------------------+-----------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------
Similar to #25061, WP_HTTP_Streams doesn't account for
`mbstring.func_overload`, and since it's also going to be an issue with
WP_Filesystem in #25237 I've gone searching for a simpler solution.
Attached is a patch which introduces a helper function to set/reset the
mbstring internal encoding, limited testing performed, but it appears to
work as expected.
It's possible to call it multiple times (nested) as long as there are the
same number of reset calls made.
An alternative solution, would be to set the mbstring internal encoding
'''globally''' for WordPress, forcing it to our preferred character
encoding, something that although I love the idea of at first, it may have
significant impacts for users who actually rely upon it.
Commits where we've implemented workarounds: [25051] [17592]
It also appears the [http://core.trac.wordpress.org/browser/trunk/src/wp-
includes/ID3/getid3.php#L144 ID3] library doesn't like
`mbstring.func_overload`, in addition to
[http://core.trac.wordpress.org/browser/trunk/src/wp-
includes/pomo/streams.php#L18 pomo] having a
[http://core.trac.wordpress.org/browser/trunk/src/wp-
includes/pomo/streams.php#L62 set of workarounds] for it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25259>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list