PHPを使用して文字列をUTF-8に変換する最良の方法は何でしょうか。
以下はページ上で問題ないように見えますが、MySQLでは一部の文字が文字化けしているように見えます。
- MYSQL:
UPGRADE EVENT – New Mazda2 from £124.99 per month. Representative 0% APR over 3 years. Min 50% deposit required. Call xxxxxxxxxxxx for test drive, info or Ts&Cs.
- ページ上:
UPGRADE EVENT - New Mazda2 from £124.99 per month. Representative 0% APR over 3 years. Min 50% deposit required. Call xxxxxxxxxxxx for test drive, info or Ts&Cs.
iconv、mb_string、html_entity_decode、htmlentities、mb_convert_encodingなどを見てきました。
データベースの照合はutf8_unicode_ciであり、テーブルの文字セットはutf8です。