解决数据库存取emoji另一种方法

存进数据库前进行编码

 comment.setContent(URLEncoder.encode(comment.getContent(), "utf-8"));

取出前解码

 comment.setContent(URLDecoder.decode(comment.getContent(), "utf-8"));
发布了75 篇原创文章 · 获赞 12 · 访问量 3461

猜你喜欢

转载自blog.csdn.net/weixin_44737877/article/details/103001412