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

WordPress Trac noreply at wordpress.org
Sun Aug 31 06:03:58 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    |     Focuses:
-------------------------+---------------------

Comment (by dmsnell):

 In [changeset:"60695" 60695]:
 {{{
 #!CommitTicketReference repository="" revision="60695"
 Formatting: Rely on _wp_can_use_pcre_u() to detect UTF-8 PCRE support.

 The `sanitize_file_name()` function attempts to detect UTF-8 PCRE support,
 but WordPress already provides a more robust method. It then caches its
 check in a static var, which WordPress already does in the canonical
 function `_wp_can_use_pcre_u()`.

 This patch refactors `sanitize_file_name()` to call `_wp_can_use_pcre_u()`
 directly instead of (mostly) recreating and recaching Core’s detection
 algorithm.

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

 Follow-up to [60694].

 Props dmsnell.
 See #63863.
 }}}

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


More information about the wp-trac mailing list