mysqli_query($con,"SET CHARACTER SET 'utf8'");
mysqli_set_charset($con,'utf8mb4');
Using select query i get
:جدیث: ØÂ-ضورصلیعلی۠وسلم Ù†Û’ ÙÂرمایا:
I want to this format
The text has been mangled twice.
رص
رص
. (The "Mojibake" of that is what is in step 1.)رص
, 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:
`جدیث: ØÂ-ضو` --> `جدیث` --> `جدیث`