This has been asked before and answered: How to convert an entire MySQL database characterset and collation to UTF-8?
The right answer is along the lines of:
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
However, there is a comment on that answer, which describes the problem I am facing:
The CONVERT TO technique assumes that the text was correctly stored in some other charset (eg, latin1), and not mangled (such as UTF-8 bytes crammed into latin1 column without conversion to latin1). – Rick James Apr 19, 2017 at 16:03
I have a table that uses cp1252 encoding and latin1_bin collation. It stores "Pelé" instead of "Pelé". After running the above command, such mangled text has no change so it remains mangled. If it matters, the reading application is on PHP.
How can I fix my data in the database?