[wp-trac] [WordPress Trac] #63863: Standardize UTF-8 handling and fallbacks in 6.9

WordPress Trac noreply at wordpress.org
Thu Oct 16 23:17:30 UTC 2025


#63863: Standardize UTF-8 handling and fallbacks in 6.9
--------------------------------------+---------------------
 Reporter:  dmsnell                   |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  6.9
Component:  Charset                   |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by dmsnell):

 In [changeset:"60950" 60950]:
 {{{
 #!CommitTicketReference repository="" revision="60950"
 Charset: Conditionally polyfill utf8_encode() and utf8_decode().

 The `utf8_encode()` and `utf8_decode()` functions were deprecated in PHP
 8.2.0 and will be removed in PHP 9.0. When that happens, any existing code
 which calls them will trigger a crash.

 This patch introduces polyfills for those functions when they aren’t
 already present. The polyfill functions maintain backwards compatibility,
 including a deprecation notice.

 Any code calling either of these functions ought to be refactored to avoid
 using them; there are better options which don’t carry the issues these
 functions do, and any code calling them is likely calling them
 inappropriately.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10011
 Discussed in https://core.trac.wordpress.org/ticket/55603
 Discussed in https://core.trac.wordpress.org/ticket/63863

 See #63863.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63863#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list