convert utf8mb4 characters to utf8 in php

ぐ巨炮叔叔 提交于 2019-12-10 23:37:51

问题


is there a way to convert utf8mb4 characters to utf8 to store in a utf8 mysql database? and then when we get it from database, restore it to utf8mb4.

goal is storing phone smiley in a utf8 database without having to change database encoding.

for example replace first byte of those characters to a special byte and then in restoration change it back?


回答1:


ok what I did was using BLOB type for that column..



来源:https://stackoverflow.com/questions/18273120/convert-utf8mb4-characters-to-utf8-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!