Illegal mix of collations

I have upgrade my old project PHPMaker 2020 to PHPMaker 2021
after I regularly got an error as -
xxx\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php(128): An exception occurred while executing ‘SELECT * FROM ledger WHERE (mobile = ‘Ì¡FfË°~~/MU’) AND (Activated = ‘Y’)’: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='But if I clear the browser cache history then the website is working.
This error occurs whenever I generate the full code from the PHPMaker 2021

Is there any resolved for this -
xxxxxxx\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php(128): An exception occurred while executing ‘SELECT * FROM ledger WHERE (mobile = ‘ıY9)r-’) AND (Activated = ‘Y’)’: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='here I use simple mobile no. for 10 digit but why here the some unknown ‘ıY9)r-’ is showing.
This problem occurs only when I generate the full code and try to refresh the pageBut In this same code If I delete the cache memory from the browser then I can open the page again without showing any error.

Here are some related topics, perhaps would help you: