[wp-trac] [WordPress Trac] #58871: support uca14.0.0 collation in database where available
WordPress Trac
noreply at wordpress.org
Mon Sep 29 21:02:24 UTC 2025
#58871: support uca14.0.0 collation in database where available
-------------------------------------------------+-------------------------
Reporter: danielblack | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Database | Version: 6.3
Severity: major | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing needs-refresh | performance
-------------------------------------------------+-------------------------
Changes (by oxfordmetadata):
* keywords: has-patch has-unit-tests needs-testing => has-patch has-unit-
tests needs-testing needs-refresh
* focuses: => performance
* severity: normal => major
Comment:
@craigfrancis Hello! Shall you please finalize this? Just to report that
we are happily working with utf8mb4_uca1400_ai_ci yet if this collation is
not defined in wp-config withdefine('DB_COLLATE',
'utf8mb4_uca1400_ai_ci'); all new tables are defaulting to
utf8mb4_unicode_520_ci, due to the instructions here:
{{{#!php
<?php
public function determine_charset( $charset, $collate ) {
if ( ( ! ( $this->dbh instanceof mysqli ) ) || empty(
$this->dbh ) ) {
return compact( 'charset', 'collate' );
}
if ( 'utf8' === $charset ) {
$charset = 'utf8mb4';
}
if ( 'utf8mb4' === $charset ) {
// _general_ is outdated, so we can upgrade it to
_unicode_, instead.
if ( ! $collate || 'utf8_general_ci' === $collate
) {
$collate = 'utf8mb4_unicode_ci';
} else {
$collate = str_replace( 'utf8_',
'utf8mb4_', $collate );
}
}
// _unicode_520_ is a better collation, we should use that
when it's available.
if ( $this->has_cap( 'utf8mb4_520' ) &&
'utf8mb4_unicode_ci' === $collate ) {
$collate = 'utf8mb4_unicode_520_ci';
}
return compact( 'charset', 'collate' );
}
}}}
Also please take into account this paper by MariaDB: https://mariadb.org
/wp-content/uploads/2023/10/Improving-Consistency-Performance-
Compatibility-Ease-of-use.pdf
Never mind asking "any" AI chatbot like:
https://claude.ai/share/9c9849b8-7f45-4e2b-aaa5-a51d1f5454e4
https://g.co/gemini/share/06fccd03103c
https://chatgpt.com/share/68da27d7-ee5c-800a-9035-574623b58e2c
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58871#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list