Am I correctly supporting UTF-8 in my PHP apps?

前端 未结 5 1357
盖世英雄少女心
盖世英雄少女心 2020-11-30 20:39

I would like to make sure that everything I know about UTF-8 is correct. I have been trying to use UTF-8 for a while now but I keep stumbling across more and more bugs and o

5条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 21:00

    UTF-8 is fine, and doesn't have any limits that UTF-16 solves. PHP doens't changes it's way to store strings in memory (unlike Python). If the entire data flow is using UTF-8 (web forms receive UTF-8 data, tables use utf8 encoding and you're using the SET NAMES utf8, and data is stored without being altered (no charset conversion), that should be fine.

提交回复
热议问题