[wp-trac] [WordPress Trac] #55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode() functions
WordPress Trac
noreply at wordpress.org
Tue Mar 10 19:08:40 UTC 2026
#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| SergeyBiryukov
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 7.0
Component: General | Version: 6.0
Severity: normal | Resolution:
Keywords: 2nd-opinion php82 dev-feedback has- | Focuses: coding-
patch has-unit-tests | standards
-------------------------------------------------+-------------------------
Comment (by dmsnell):
@rodrigosprimo @juanmaguitar we would do well to separate uses of these
functions in Core as a separate aspect of this ticket, because the
troubling part about them is neither that they call deprecated functions,
nor that they call functions which might not exist, but rather that they
never should have called those functions in the first place.
in the absence of concrete knowledge about a text encoding we should avoid
assuming that it’s ISO-8859-1 and avoid converting the raw bytes into
UTF-8 as if it were.
Regardless, let’s avoid thinking about `ignore` comments or waiting for
decisions here: even if `utf8_encode()` were not deprecated, we should
still remove all traces of them from Core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55603#comment:99>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list