当前位置:网站首页>phpexcel导出emoji符号报错
phpexcel导出emoji符号报错
2022-07-26 09:23:00 【为天空着色】
原文:http://blog.csdn.net/SakuraLLj/article/details/72823765
phpexcel导出用户数据成excel时,如果昵称包含表情,会导致数据不完整。
过滤或替换emoji。因为emoji通过json_encode后,大部分都是u[ed] 开头的编码,所以先对昵称json_encode然后用正则过滤或替换成*,以下时相关代码:
$value = json_encode($value);
$value = preg_replace("/\\\u[ed][0-9a-f]{3}\\\u[ed][0-9a-f]{3}/","*",$value);//替换成*
$value = json_decode($value);
边栏推荐
- JVM command induction
- When you click input, the border is not displayed!
- NTT (fast number theory transformation) polynomial inverse 1500 word analysis
- Pat grade a A1034 head of a gang
- CF1481C Fence Painting
- 字节缓冲流&字符流详解
- Cat installation and use
- 使用openLayer画箭头
- Advanced mathematics | Takeshi's "classic series" daily question train of thought and summary of error prone points
- Li Mu D2L (V) -- multilayer perceptron
猜你喜欢

The essence of attack and defense strategy behind the noun of network security

Redis principle and use - Basic Features

【Mysql】Mysql锁详解(三)

小程序纪录

Li Mu D2L (VI) -- model selection

异常处理机制二

jvm命令归纳

Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain

volatile 靠的是MESI协议解决可见性问题?(下)

服务器内存故障预测居然可以这样做!
随机推荐
服务器内存故障预测居然可以这样做!
Laravel框架日志文件存放在哪里?怎么用?
760. 字符串长度
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
Under a directory of ext3 file system, subfolders cannot be created, but files can be created
“could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32” 问题处理
VS2019配置opencv
OnTap 9 file system limitations
微信小程序学习笔记2
el-table实现增加/删除行,某参数跟着变
Polynomial open root
字节缓冲流&字符流详解
您的登录IP不在管理员配置的登录掩码范围内
What are CSDN spaces represented by
Pat grade a A1034 head of a gang
2022 chemical automation control instrument operation certificate test question simulation test platform operation
The Child and Binary Tree-多项式开根求逆
js在控制台输出菱形
"No input file specified" problem handling
Object type collections are de duplicated according to the value of an attribute