UTF8 and Japanese characters

前端 未结 4 697
星月不相逢
星月不相逢 2021-01-03 11:31

Problem: Foreign character are not displayed as they should be. This includes German, Japanese, Russian and all others excluding English (works perfectly). Ones PHP makes a

4条回答
  •  隐瞒了意图╮
    2021-01-03 12:16

    mysql utf-8 is not the real utf-8. it uses 3 bytes instead of 4. For real utf-8, you have to use utf8mb4:

    mysql_query("SET NAMES utf8mb4");
    mysql_set_charset("utf8mb4");
    

提交回复
热议问题