How to make MySQL handle UTF-8 properly

前端 未结 14 2531
被撕碎了的回忆
被撕碎了的回忆 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:31

    These tips on MySQL and UTF-8 may be helpful. Unfortunately, they don't constitute a full solution, just common gotchas.

    0 讨论(0)
  • 2020-11-22 07:31

    Was able to find a solution. Ran the following as specified at http://technoguider.com/2015/05/utf8-set-up-in-mysql/

    SET NAMES UTF8;
    set collation_server = utf8_general_ci;
    set default-character-set = utf8;
    set init_connect = ’SET NAMES utf8′;
    set character_set_server = utf8;
    set character_set_client = utf8;
    
    0 讨论(0)
提交回复
热议问题