How to make MySQL handle UTF-8 properly

前端 未结 14 2747
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 06:38

One of the responses to a question I asked yesterday suggested that I should make sure my database can handle UTF-8 characters correctly. How I can do this with MySQL?

14条回答
  •  無奈伤痛
    2020-11-22 07:29

    I followed Javier's solution, but I added some different lines in my.cnf:

    [myslqd]
    skip-character-set-client-handshake
    collation_server=utf8_unicode_ci
    character_set_server=utf8 
    

    I found this idea here: http://dev.mysql.com/doc/refman/5.0/en/charset-server.html in the first/only user comment on the bottom of the page. He mentions that skip-character-set-client-handshake has some importance.

提交回复
热议问题