search

Home  >  Q&A  >  body text

Database returns garbled code

Both the database and connection character sets are set to utf8, but the database query returns garbled characters

SunSun2082 days ago1177

reply all(2)I'll reply

  • 月

    2019-06-05 11:08:12

    1. When creating a data table, set the utf-8 format
    2. When connecting to the database, set the utf-8 format
    3. Write PHP code and set the utf-8 format
    4. Browse Whether the encoder encoding is in utf-8 format

    reply
    0
  • 天蓬老师

    天蓬老师2019-05-10 16:29:14

    The encoding of your client code must also be consistent

    reply
    0
  • Cancelreply