Expand mojibake repair to punctuation and symbols

This commit is contained in:
2026-09-08 15:30:59 +02:00
parent 25de2a13f9
commit 2e4dd7417a
3 changed files with 38 additions and 9 deletions
+8 -4
View File
@@ -1,7 +1,8 @@
# Mojibake Repair (Temporary)
Version 1.1.0 replaces the original whole-column SQL conversion with targeted
replacements for Czech letters misdecoded as ISO-8859-1 or Windows-1252.
Version 1.1.1 uses targeted replacements for Czech letters, common punctuation,
symbols and nonbreaking spaces misdecoded as ISO-8859-1 or Windows-1252. It extends
the serialization-safe repair introduced in version 1.1.0.
## Why version 1.0.0 could break fonts
@@ -26,7 +27,10 @@ serialization risk in its [migration guide](https://developer.wordpress.org/adva
## Behavior and limits
- Repairs recognized Czech mojibake sequences without transcoding whole values.
- Repairs recognized mojibake sequences without transcoding whole values.
Targets include Czech letters and `– — ‘ ’ ‚ “ ” „ … • « » ‹ › € ™ © ® °`,
plus nonbreaking spaces. For example, `–` becomes `–`, `’` becomes `’`,
and `…` becomes `…`. Both Latin-1 and Windows-1252 forms are covered.
Other corruption patterns and JSON `\uXXXX` escapes are outside this repair's
scope. A sequence intentionally shown as a mojibake example will also match,
so review the preview.
@@ -50,7 +54,7 @@ serialization risk in its [migration guide](https://developer.wordpress.org/adva
## Local verification
Run `php -l wp-mojibake-repair.php` and `php tests/repair.php`.
The regression script requires PDO SQLite and iconv. It checks Czech text,
The regression script requires PDO SQLite and iconv. It checks Czech text, punctuation,
serialized typography settings, preserved CSS/JSON, skipped unsafe values,
batching, preview approvals, rollback, and cache invalidation. Database-flow
checks use a SQLite adapter; they do not replace verification on WordPress/MySQL.