The text has been mangled twice.
- start with
رص
- treat that as if it were erroneously converted through latin1, I get
رص
. (The "Mojibake" of that is what is in step 1.)
- Again, doing an un-Mojibake, I see
رص
, which is probably part of that png. That's Arabic REH and SAD; does that sound likely?
See "Mojibake" in Trouble with UTF-8 characters; what I see is not what I stored for the likely causes. But, then, realize that the mangling was done twice!
Dig through how the text is processed. But keep in mind that there are at least 2 sequential mistakes. Perhaps even copying the data from one table/database/system to another, with each one doing its own Mojibake?
(I have been chasing charset problems for years; this is, I think, a new scenario to me!)
Undoing one stage:
CONVERT(BINARY(CONVERT('رص' USING latin1)) USING utf8mb4) --> `رص`
(Sorry if I have lost the right-to-left vs left-to-right.)
But you need to avoid latin1 at all stages. mysqli_set_charset
and <meta>
are only two parts of the picture.
Longer string:
`جدیث: ØÂ-ضو` --> `جدیث` --> `جدیث`