phacility/phabricator · error · Exception
Unsupported character set "%s".
Error message
Unsupported character set "%s".
What it means
During the schema-adjustment phase of `bin/storage upgrade`, an adjustment for a column carries a charset other than binary, utf8 or utf8mb4 — the only values this switch can render into `ALTER ... CHARACTER SET`. The exception means the code that computes expected schema and the code that applies adjustments disagree, which in practice indicates local modifications or a mixed-version tree.
Source
Thrown at src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:371
if ($auto) {
$parts[] = qsprintf(
$conn,
'AUTO_INCREMENT');
}
if ($adjust['charset']) {
switch ($adjust['charset']) {
case 'binary':
$charset_value = qsprintf($conn, 'binary');
break;
case 'utf8':
$charset_value = qsprintf($conn, 'utf8');
break;
case 'utf8mb4':
$charset_value = qsprintf($conn, 'utf8mb4');
break;
default:
throw new Exception(
pht(
'Unsupported character set "%s".',
$adjust['charset']));
}
switch ($adjust['collation']) {
case 'binary':
$collation_value = qsprintf($conn, 'binary');
break;
case 'utf8_general_ci':
$collation_value = qsprintf($conn, 'utf8_general_ci');
break;
case 'utf8mb4_bin':
$collation_value = qsprintf($conn, 'utf8mb4_bin');
break;
case 'utf8mb4_unicode_ci':
$collation_value = qsprintf($conn, 'utf8mb4_unicode_ci');
break;View on GitHub (pinned to 5720a38cfe)
Solutions
- Restore one coherent code version: verify `git status`, redeploy cleanly, restart PHP so opcache reloads.
- Remove local schema-spec changes that introduce charsets outside binary/utf8/utf8mb4, or update the specs to use supported values.
- If you maintain a fork that genuinely needs the charset, extend the switch in PhabricatorStorageManagementWorkflow in the same change as the spec.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// bin/storage upgrade including the adjust phase
} catch (Exception $ex) {
// adjustment invariant broke; do not retry until code versions are coherent
fwrite(STDERR, $ex->getMessage()."\n");
exit(1);
} Prevention
- Deploy the whole tree atomically and restart PHP so opcache cannot serve mixed versions.
- Keep schema-spec changes and the storage workflow switch in the same commit.
- Treat this exception as a code defect signal, not an environment fault.
When it happens
Trigger: An adjustment record with an unrecognized charset reaches the switch: a fork extending schema specs with a new charset without extending this switch, or storage-management code and schema-spec code from different Phabricator versions (for example stale opcache after a partial deploy).
Common situations: Running bin/storage from one version of the tree against patched or half-updated code; forks adding charset handling; opcache serving an old workflow file after a pull.
Related errors
- Unsupported collation set "%s".
- Unknown schema adjustment kind "%s"!
- Almanac service, device, property, network and namespace nam
- Specify the dumpfile to read with "--input", or use "--live"
- Specify namespace to rename from with %s.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/5e05fbe9d715bf88.
Report an issue: GitHub.