The ultimate emoji encoding scheme

后端 未结 2 949
一个人的身影
一个人的身影 2020-12-03 22:10

This is my environment: Client -> iOS App, Server ->PHP and MySQL.

The data from client to server is done via HTTP POST.

The data from server to client is d

2条回答
  •  Happy的楠姐
    2020-12-03 22:49

    Use utf8mb4 throughout MySQL:

    • SET NAMES utf8mb4
    • Declare the table/columns CHARACTER SET utf8mb4
    • Emoji and certain Chinese characters will work in utf8mb4, but not in MySQL's utf8.

    Use UTF-8 throughout other things:

    • HTML:

    ¿ or á are (or at least can be) encoded in utf8 (utf8mb4)

提交回复
热议问题